I have a condition like this
String str = null;
try{
...
str = "condition2";
}catch (ApplicationException ae) {
str = "condition3";
}catch (IllegalStateException ise) {
str = "condition3";
}catch (Exception e) {
str = "condition3";
}
if(str == null){
str = "none";
}
Now I want to sum up all str = "condition3";
in one line. As finally block runs always so that will not fulfill my needs. What else can be done.