added msg in case where there are no problems found

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@240 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2002-07-08 17:59:33 +00:00
parent af7a4c231c
commit 57837172fd

View File

@ -66,7 +66,7 @@ public class PMDJEditPlugin extends EBPlugin {
// TODO switch to use StringReader once PMD 0.4 gets released // TODO switch to use StringReader once PMD 0.4 gets released
pmd.processFile(new StringBufferInputStream(text), rules, ctx); pmd.processFile(new StringBufferInputStream(text), rules, ctx);
String msg = ""; String msg = "No errors found";
for (Iterator i = ctx.getReport().iterator(); i.hasNext();) { for (Iterator i = ctx.getReport().iterator(); i.hasNext();) {
RuleViolation rv = (RuleViolation)i.next(); RuleViolation rv = (RuleViolation)i.next();
msg += rv.getDescription() + " at line " + rv.getLine() + System.getProperty("line.separator"); msg += rv.getDescription() + " at line " + rv.getLine() + System.getProperty("line.separator");