fix yet another AIOOBE caused by finally dfa

This commit is contained in:
peter
2013-10-01 13:16:18 +02:00
parent 3a1ab0f858
commit 0378563657
3 changed files with 33 additions and 0 deletions
@@ -0,0 +1,31 @@
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
public class Foo {
private void run(int port) throws Exception {
Socket socket = new Socket("localhost", port);
try {
InputStream inputReader = socket.getInputStream();
try {
OutputStream outputWriter = socket.getOutputStream();
try {
while (true) {
inputReader.read();
}
}
finally {
outputWriter.close();
}
}
finally {
inputReader.close();
}
}
finally {
socket.close();
}
}
}