A
Anonymous user
Hello,
i'm searching a tool for java source code wich can enable me to
replace/refactor some (ugly) code. Let's take an example:
1/ what i have:
catch (Exception ex) {
Log.getLog().log("Cannot read \" + filename + "\": " + ex);
}
what i want:
catch (Exception ex) {
Log.getNewLog().log("Cannot read \" + filename + "\".", ex);
}
2/ what i have:
catch (Exception ex) {
Log.getLog().log("There was a problem!");
Log.getLog().log(ex);
}
what i want:
catch (Exception ex) {
Log.getNewLog().log("There was a problem!", ex);
}
3/ and sometimes, i have only the exception or the sting.
Even if a i have to code some kind of AST matching code, it's OK. But
can't do it from scratch. So what do you think is the best tool to use?
TIA for any help
i'm searching a tool for java source code wich can enable me to
replace/refactor some (ugly) code. Let's take an example:
1/ what i have:
catch (Exception ex) {
Log.getLog().log("Cannot read \" + filename + "\": " + ex);
}
what i want:
catch (Exception ex) {
Log.getNewLog().log("Cannot read \" + filename + "\".", ex);
}
2/ what i have:
catch (Exception ex) {
Log.getLog().log("There was a problem!");
Log.getLog().log(ex);
}
what i want:
catch (Exception ex) {
Log.getNewLog().log("There was a problem!", ex);
}
3/ and sometimes, i have only the exception or the sting.
Even if a i have to code some kind of AST matching code, it's OK. But
can't do it from scratch. So what do you think is the best tool to use?
TIA for any help