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:
parent
9832267904
commit
15c91c8ec2
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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() + "]";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue