Added 'success!' message

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@2142 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2003-07-31 13:48:03 +00:00
parent 2a6c9988bc
commit 5f1f887f53

View File

@ -9,6 +9,9 @@ import java.util.Iterator;
public class TextRenderer implements Renderer { public class TextRenderer implements Renderer {
public String render(Report report) { public String render(Report report) {
if (report.isEmpty()) {
return "No problems found!";
}
StringBuffer buf = new StringBuffer(); StringBuffer buf = new StringBuffer();
for (Iterator i = report.iterator(); i.hasNext();) { for (Iterator i = report.iterator(); i.hasNext();) {
RuleViolation rv = (RuleViolation) i.next(); RuleViolation rv = (RuleViolation) i.next();