I'm not sure this is a new behavior and actually a feature, but has created some confusion on my side and I can't remember to have such thing in the past.
Eclipse SDK
Version: 2025-03 (4.35)
Build id: I20241203-1800
Consider the following code snippet:
public static void main(String[] args) {
try {
//throw new Exception();
//new FileOutputStream("");
} catch(Exception e) {
throw e;
}
}
this code compiles without any error or warning!
Now comment in the first line
public static void main(String[] args) {
try {
throw new Exception();
//new FileOutputStream("");
} catch(Exception e) {
throw e;
}
}
this results in what I have expsected in the first place

now use the second line:
public static void main(String[] args) {
try {
//throw new Exception();
new FileOutputStream("");
} catch(Exception e) {
throw e;
}
}
this gives a little different hint:

and even if it talks about FileNotFoundException, if I apply the quickfix I get this
public static void main(String[] args) throws Exception {
try {
//throw new Exception();
new FileOutputStream("");
} catch(Exception e) {
throw e;
}
}
I'm not sure this is a new behavior and actually a feature, but has created some confusion on my side and I can't remember to have such thing in the past.
Consider the following code snippet:
this code compiles without any error or warning!
Now comment in the first line
this results in what I have expsected in the first place

now use the second line:
this gives a little different hint:

and even if it talks about FileNotFoundException, if I apply the quickfix I get this