#72637 - a lot of garbage printed to log when parsing fails

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4239 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Radim Kubacki
2006-02-14 13:41:11 +00:00
parent d5625e0604
commit ab8cfe94e4
2 changed files with 8 additions and 7 deletions

View File

@ -1,6 +1,7 @@
- fixed some bugs
http://www.netbeans.org/issues/show_bug.cgi?id=72017
http://www.netbeans.org/issues/show_bug.cgi?id=72215
http://www.netbeans.org/issues/show_bug.cgi?id=72637
http://www.netbeans.org/issues/show_bug.cgi?id=71141
#1429406 - NoSuchMethodError while saving options
- few UI tweaks

View File

@ -231,15 +231,15 @@ public class RunPMDAction extends CookieAction {
try {
pmd.processFile( reader, set, ctx );
} catch( PMDException e ) {
Fault fault = new Fault( 1, name, e );
ErrorManager.getDefault().log(ErrorManager.ERROR, "PMD threw exception " + e.toString());
ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
// XXX why to report this ?
list.add( fault );
FaultRegistry.getInstance().registerFault( fault, dataobject );
// want to log only short info about failure and stack only when -J-Dpmd=-1 or similar flag is on
ErrorManager.getDefault().log(ErrorManager.INFORMATIONAL+1, "PMD threw exception " + e.toString());
ErrorManager err = ErrorManager.getDefault().getInstance("pmd");
if (err.isLoggable(err.INFORMATIONAL)) {
err.notify(ErrorManager.INFORMATIONAL, e); // NOI18N
}
}
Iterator iterator = ctx.getReport().iterator();
Iterator/*<RuleViolation>*/ iterator = ctx.getReport().iterator();
while( iterator.hasNext() ) {
RuleViolation violation = ( RuleViolation )iterator.next();
StringBuffer buffer = new StringBuffer();