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
This commit is contained in:
Anna.Kozlova
2017-12-04 15:14:28 +01:00
parent 85946c7f52
commit 7f91247966
4 changed files with 22 additions and 5 deletions
@@ -6,6 +6,7 @@ class C {
void m(File file) throws IOException {
<caret>FileInputStream fileInputStream = new FileInputStream(file);
String s = "initial value";//Non-NLS
String bar = s + fileInputStream.read();
s = s + fileInputStream.read();
s += "end";
}
}