for two classes with same name and different package:
bar.MyException;
foo.MyException;
A class using them:
public class Test {
public static void main(String[] args) {
boolean flag = true;
try {
if(flag) {
throw new foo.MyException();
} else {
throw new bar.MyException();
}
} catch (foo.MyException e) {
} catch (bar.MyException ex) {
}
}
}
is decomplied as:
import bar.MyException;
import foo.MyException;
public class Test {
public static void main(String[] args) {
boolean flag = true;
try {
if (flag)
throw new MyException();
throw new MyException();
} catch (MyException myException) {
} catch (MyException myException) {}
}
}
Is it possible to detect this name match and explicity put which class is used in which place?
for two classes with same name and different package:
A class using them:
is decomplied as:
Is it possible to detect this name match and explicity put which class is used in which place?
I can provide the maven project to test if needed