Checkstyle fixes / enable suppressions
This commit is contained in:
@ -83,10 +83,11 @@ public abstract class AbstractRuleChainVisitor implements RuleChainVisitor {
|
||||
List<Node> ns = nodeNameToNodes.get(nodeNames.get(j));
|
||||
for (Node node : ns) {
|
||||
// Visit with underlying Rule, not the RuleReference
|
||||
while (rule instanceof RuleReference) {
|
||||
rule = ((RuleReference) rule).getRule();
|
||||
Rule actualRule = rule;
|
||||
while (actualRule instanceof RuleReference) {
|
||||
actualRule = ((RuleReference) actualRule).getRule();
|
||||
}
|
||||
visit(rule, node, ctx);
|
||||
visit(actualRule, node, ctx);
|
||||
}
|
||||
visits += ns.size();
|
||||
}
|
||||
|
@ -257,16 +257,15 @@ public final class StringUtil {
|
||||
char c;
|
||||
int i = 0;
|
||||
while (i < src.length()) {
|
||||
c = src.charAt(i);
|
||||
c = src.charAt(i++);
|
||||
if (c > '~') {
|
||||
// 126
|
||||
if (!supportUTF8) {
|
||||
int codepoint = c;
|
||||
// surrogate characters are not allowed in XML
|
||||
if (Character.isHighSurrogate(c)) {
|
||||
char low = src.charAt(i + 1);
|
||||
char low = src.charAt(i++);
|
||||
codepoint = Character.toCodePoint(c, low);
|
||||
i += 1;
|
||||
}
|
||||
buf.append("&#x").append(Integer.toHexString(codepoint)).append(';');
|
||||
} else {
|
||||
@ -283,7 +282,6 @@ public final class StringUtil {
|
||||
} else {
|
||||
buf.append(c);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
1
pom.xml
1
pom.xml
@ -606,6 +606,7 @@
|
||||
</dependencies>
|
||||
<configuration>
|
||||
<configLocation>/net/sourceforge/pmd/pmd-checkstyle-config.xml</configLocation>
|
||||
<suppressionsLocation>/net/sourceforge/pmd/pmd-checkstyle-suppressions.xml</suppressionsLocation>
|
||||
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
||||
<sourceDirectories>
|
||||
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
|
||||
|
Reference in New Issue
Block a user