Files
openide/java/java-tests/testData/codeInsight/surroundAutoCloseable/CommentsInVarDeclaration.java
Anna.Kozlova 7f91247966 surround with auto-closeable: ensure final is restored from existing var
otherwise with generateFinalLocals=true, non-final variables could be made final which leads to red code
2017-12-04 15:14:28 +01:00

13 lines
324 B
Java

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
class C {
void m(File file) throws IOException {
<caret>FileInputStream fileInputStream = new FileInputStream(file);
String s = "initial value";//Non-NLS
s = s + fileInputStream.read();
s += "end";
}
}