Closed snuyanzin closed 1 year ago
example of code failing with this
public class Issue185 {
public static void test() {
try {
java.io.BufferedReader br = new java.io.BufferedReader(new java.io.InputStreamReader(System.in));
try {
String line;
while ((line = br.readLine()) != null) {
System.out.println(line);
}
} finally {
br.close();
}
} catch (java.io.IOException e) {
throw new RuntimeException(e);
}
}
}
initialization of variable before while
helps like String line = null;
Reproduced.
Fixed. Please test.
tested with corresponding flink tests initially failed with this issue, now they are passing. thank you very much!
We are trying to update Calcite from 1.27.0(janino 3.0.11) to 1.28.0(janino 3.1.6) Some tests starts failing with (also reproducible with 3.1.8)
I noticed that it happens for this code snippet
At the same time janino 3.0.11 and 3.1.0 could compile it without issues. Currently I found this workaround which could make it compilable: rewrite it in a way
a bit more trace