mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
fix yet another AIOOBE caused by finally dfa
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user