Add missing toString() methods. #1555

Fixes `ObjectToString` inspection violations.

Description:
>Reports any calls to .toString() which use the default implementation from java.lang.Object. The default implementation is rarely desired, but easy to use by accident. Calls to .toString() on objects of type java.lang.Object are ignored by this inspection.
This commit is contained in:
Michal Kordas 2015-08-17 23:03:22 +02:00 committed by Roman Ivanov
parent 9832267904
commit 15c91c8ec2
2 changed files with 2 additions and 3 deletions

View File

@ -266,7 +266,7 @@ public final class TreeWalker
else {
throw new CheckstyleException("Token \""
+ token + "\" was not found in Acceptable tokens list"
+ " in check " + check);
+ " in check " + check.getClass().getName());
}
}
}

View File

@ -491,8 +491,7 @@ public abstract class AbstractTypeAwareCheck extends Check {
@Override
public String toString() {
return "ClassAlias[alias " + getName()
+ " for " + classInfo + "]";
return "ClassAlias[alias " + getName() + " for " + classInfo.getName() + "]";
}
}