Fix pmd, add missing test classes for typeres

This commit is contained in:
Andreas Dangel
2020-08-13 17:00:34 +02:00
parent c48f407e28
commit 278e4f3414
3 changed files with 19 additions and 2 deletions

View File

@ -285,8 +285,7 @@ public class StringToStringRule extends AbstractJavaRule {
private Class<?> getMethodReturnType(ASTMethodDeclaration method) {
ASTType returnType = method != null ? method.getResultType().getFirstDescendantOfType(ASTType.class) : null;
if (returnType != null) {
Class<?> type = returnType.getType();
return type;
return returnType.getType();
}
return null;
}

View File

@ -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 {
}

View File

@ -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 {
}