forked from phoedos/pmd
Fix PMD issues in core and test
This commit is contained in:
@ -80,13 +80,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
return obj instanceof PropertyDescriptor
|
||||
return this == obj || obj instanceof PropertyDescriptor
|
||||
&& name.equals(((PropertyDescriptor<?>) obj).name());
|
||||
}
|
||||
|
||||
|
@ -352,7 +352,7 @@ public abstract class AbstractRuleSetFactoryTest {
|
||||
file = file.replaceAll("xsi:schemaLocation=\"" + rulesetNamespace
|
||||
+ " https://pmd.sourceforge.io/ruleset_\\d_0_0.xsd\"", "");
|
||||
|
||||
if (rulesetNamespace.equals(RuleSetWriter.RULESET_2_0_0_NS_URI)) {
|
||||
if (RuleSetWriter.RULESET_2_0_0_NS_URI.equals(rulesetNamespace)) {
|
||||
file = "<?xml version=\"1.0\"?>" + PMD.EOL + "<!DOCTYPE ruleset SYSTEM "
|
||||
+ "\"https://pmd.sourceforge.io/ruleset_2_0_0.dtd\">" + PMD.EOL + file;
|
||||
} else {
|
||||
|
@ -10,6 +10,7 @@ import java.util.Comparator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
@ -34,7 +35,7 @@ import net.sourceforge.pmd.Rule;
|
||||
* @author Andreas Dangel
|
||||
*/
|
||||
public class RuleTestRunner extends ParentRunner<TestDescriptor> {
|
||||
private ConcurrentHashMap<TestDescriptor, Description> testDescriptions = new ConcurrentHashMap<>();
|
||||
private ConcurrentMap<TestDescriptor, Description> testDescriptions = new ConcurrentHashMap<>();
|
||||
private final RuleTst instance;
|
||||
|
||||
/* default */ RuleTestRunner(final Class<? extends RuleTst> testClass) throws InitializationError {
|
||||
|
Reference in New Issue
Block a user