Fix pmd, add missing test classes for typeres
This commit is contained in:
@ -285,8 +285,7 @@ public class StringToStringRule extends AbstractJavaRule {
|
|||||||
private Class<?> getMethodReturnType(ASTMethodDeclaration method) {
|
private Class<?> getMethodReturnType(ASTMethodDeclaration method) {
|
||||||
ASTType returnType = method != null ? method.getResultType().getFirstDescendantOfType(ASTType.class) : null;
|
ASTType returnType = method != null ? method.getResultType().getFirstDescendantOfType(ASTType.class) : null;
|
||||||
if (returnType != null) {
|
if (returnType != null) {
|
||||||
Class<?> type = returnType.getType();
|
return returnType.getType();
|
||||||
return type;
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
/*
|
||||||
|
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
package net.sourceforge.pmd.lang.java.rule.performance.stringtostring;
|
||||||
|
|
||||||
|
public class Car {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
/*
|
||||||
|
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
package net.sourceforge.pmd.lang.java.rule.performance.stringtostring;
|
||||||
|
|
||||||
|
public class User {
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user