Skip to content

Commit fb3664b

Browse files
committed
Fixing PMD
1 parent 054ee9b commit fb3664b

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

src/main/resources/xmlschema-pmd-ruleset.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
<exclude name="ForLoopCanBeForeach" />
3838
<exclude name="ForLoopVariableCount" />
3939
<exclude name="GuardLogStatement" />
40+
<exclude name="ImplicitFunctionalInterface" />
4041
<exclude name="LooseCoupling" />
4142
<exclude name="JUnitAssertionsShouldIncludeMessage"/>
4243
<exclude name="JUnitTestContainsTooManyAsserts" />

xmlschema-walker/src/main/java/org/apache/ws/commons/schema/docpath/SaxWalkerOverDom.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,7 @@ public void addContentHandler(ContentHandler contentHandler) {
286286
* @return <code>true</code> if it was found, <code>false</code> if not.
287287
*/
288288
public boolean removeContentHandler(ContentHandler contentHandler) {
289-
if (listeners != null) {
290-
return listeners.remove(contentHandler);
291-
}
292-
return false;
289+
return listeners != null && listeners.remove(contentHandler);
293290
}
294291

295292
/**

xmlschema-walker/src/main/java/org/apache/ws/commons/schema/docpath/XmlSchemaElementValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static void validateAttributes(XmlSchemaStateMachineNode state, Attributes attrs
111111
}
112112

113113
// Confirm the attribute is used correctly.
114-
switch (use) {
114+
switch (use) { //NOPMD
115115
case OPTIONAL:
116116
break;
117117
case PROHIBITED:

xmlschema-walker/src/main/java/org/apache/ws/commons/schema/docpath/XmlSchemaPathFinder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ private static final class PathSegment<U, V> implements Comparable<PathSegment<U
9898
}
9999

100100
@Override
101-
public int compareTo(PathSegment<U, V> o) {
101+
public int compareTo(PathSegment<U, V> o) { //NOPMD
102102
if (this == o) {
103103
return 0;
104104
}

xmlschema-walker/src/main/java/org/apache/ws/commons/schema/docpath/XmlSchemaPathManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ XmlSchemaPathNode<U, V> addParentSiblingOrContentNodeToPath(XmlSchemaPathNode<U,
5555
if (position != null) {
5656
position = position.getParent();
5757
}
58-
case SIBLING:
58+
case SIBLING: //NOPMD
5959
case CONTENT:
6060
if (position == null) {
6161
throw new IllegalStateException(

0 commit comments

Comments
 (0)