PMD Results

The following document contains the results of PMD 7.17.0.

Violations By Priority

Priority 2

org/codehaus/plexus/util/xml/pull/MXSerializer.java

Rule Violation Line
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 527

Priority 3

org/codehaus/plexus/util/xml/XmlReader.java

Rule Violation Line
CollapsibleIfStatements This if statement could be combined with its parent 349–358
UnusedFormalParameter Avoid unused method parameters such as 'lenient'. 398

org/codehaus/plexus/util/xml/Xpp3DomBuilder.java

Rule Violation Line
UnusedLocalVariable Avoid unused local variables such as 'closeMe'. 50
UnusedLocalVariable Avoid unused local variables such as 'closeMe'. 64

org/codehaus/plexus/util/xml/pull/MXParser.java

Rule Violation Line
UnusedPrivateField Avoid unused private fields such as 'fileEncoding'. 117
UnnecessaryModifier Unnecessary modifier 'final' on method 'fastHash': private methods cannot be overridden 283
CollapsibleIfStatements This if statement could be combined with its parent 1193–1196
UnusedLocalVariable Avoid unused local variables such as 'name'. 1773
CollapsibleIfStatements This if statement could be combined with its parent 1929–1933
UnusedLocalVariable Avoid unused local variables such as 'prefix'. 1953
CollapsibleIfStatements This if statement could be combined with its parent 2528–2552
CollapsibleIfStatements This if statement could be combined with its parent 2956–2966
CollapsibleIfStatements This if statement could be combined with its parent 2957–2965
CollapsibleIfStatements This if statement could be combined with its parent 3033–3035
UnnecessaryReturn Unnecessary return statement 3100

org/codehaus/plexus/util/xml/pull/MXSerializer.java

Rule Violation Line
EmptyControlStatement Empty if statement 943–956
EmptyControlStatement Empty if statement 1004–1029
UnusedLocalVariable Avoid unused local variables such as 'ch'. 1047

Priority 4

org/codehaus/plexus/util/xml/StringUtils.java

Rule Violation Line
UselessParentheses Useless parentheses around `(str == null) || str.isEmpty()`. 103
UselessParentheses Useless parentheses around `str.isEmpty()`. 103

org/codehaus/plexus/util/xml/XmlReader.java

Rule Violation Line
UselessParentheses Useless parentheses around `m.find()`. 541

org/codehaus/plexus/util/xml/Xpp3Dom.java

Rule Violation Line
UselessParentheses Useless parentheses around `(str != null) && (str.length() > 0)`. 395
UselessParentheses Useless parentheses around `(str == null) || (str.trim().length() == 0)`. 399

org/codehaus/plexus/util/xml/Xpp3DomUtils.java

Rule Violation Line
UselessParentheses Useless parentheses around `str != null && str.length() > 0`. 132
UselessParentheses Useless parentheses around `str == null || str.length() == 0`. 140

org/codehaus/plexus/util/xml/pull/MXParser.java

Rule Violation Line
UselessParentheses Useless parentheses around `new String(cbuf, off, len)`. 74
UselessParentheses Useless parentheses around `" (position:" + getPositionDescription()`. 1020
UselessParentheses Useless parentheses around `" (position:" + getPositionDescription()`. 1043
UselessParentheses Useless parentheses around `pos - 1`. 1690
UselessParentheses Useless parentheses around `pos - 1`. 1765
UselessParentheses Useless parentheses around `allStringsInterned && attributeName[j].equals(a...`. 1879–1882
UselessParentheses Useless parentheses around `ch == 'x'`. 2158
UselessParentheses Useless parentheses around `ch - '0'`. 2165
UselessParentheses Useless parentheses around `ch - ('a' - 10)`. 2168
UselessParentheses Useless parentheses around `ch - ('A' - 10)`. 2171
UselessParentheses Useless parentheses around `ch - '0'`. 2184
UselessParentheses Useless parentheses around `pos - 1`. 2239
UselessParentheses Useless parentheses around `ch == ' ' || ch == '\n' || ch == '\r' || ch == ...`. 3331

Files

org/codehaus/plexus/util/xml/StringUtils.java

Rule Violation Priority Line
UselessParentheses Useless parentheses around `(str == null) || str.isEmpty()`. 4 103
UselessParentheses Useless parentheses around `str.isEmpty()`. 4 103

org/codehaus/plexus/util/xml/XmlReader.java

Rule Violation Priority Line
CollapsibleIfStatements This if statement could be combined with its parent 3 349–358
UnusedFormalParameter Avoid unused method parameters such as 'lenient'. 3 398
UselessParentheses Useless parentheses around `m.find()`. 4 541

org/codehaus/plexus/util/xml/Xpp3Dom.java

Rule Violation Priority Line
UselessParentheses Useless parentheses around `(str != null) && (str.length() > 0)`. 4 395
UselessParentheses Useless parentheses around `(str == null) || (str.trim().length() == 0)`. 4 399

org/codehaus/plexus/util/xml/Xpp3DomBuilder.java

Rule Violation Priority Line
UnusedLocalVariable Avoid unused local variables such as 'closeMe'. 3 50
UnusedLocalVariable Avoid unused local variables such as 'closeMe'. 3 64

org/codehaus/plexus/util/xml/Xpp3DomUtils.java

Rule Violation Priority Line
UselessParentheses Useless parentheses around `str != null && str.length() > 0`. 4 132
UselessParentheses Useless parentheses around `str == null || str.length() == 0`. 4 140

org/codehaus/plexus/util/xml/pull/MXParser.java

Rule Violation Priority Line
UselessParentheses Useless parentheses around `new String(cbuf, off, len)`. 4 74
UnusedPrivateField Avoid unused private fields such as 'fileEncoding'. 3 117
UnnecessaryModifier Unnecessary modifier 'final' on method 'fastHash': private methods cannot be overridden 3 283
UselessParentheses Useless parentheses around `" (position:" + getPositionDescription()`. 4 1020
UselessParentheses Useless parentheses around `" (position:" + getPositionDescription()`. 4 1043
CollapsibleIfStatements This if statement could be combined with its parent 3 1193–1196
UselessParentheses Useless parentheses around `pos - 1`. 4 1690
UselessParentheses Useless parentheses around `pos - 1`. 4 1765
UnusedLocalVariable Avoid unused local variables such as 'name'. 3 1773
UselessParentheses Useless parentheses around `allStringsInterned && attributeName[j].equals(a...`. 4 1879–1882
CollapsibleIfStatements This if statement could be combined with its parent 3 1929–1933
UnusedLocalVariable Avoid unused local variables such as 'prefix'. 3 1953
UselessParentheses Useless parentheses around `ch == 'x'`. 4 2158
UselessParentheses Useless parentheses around `ch - '0'`. 4 2165
UselessParentheses Useless parentheses around `ch - ('a' - 10)`. 4 2168
UselessParentheses Useless parentheses around `ch - ('A' - 10)`. 4 2171
UselessParentheses Useless parentheses around `ch - '0'`. 4 2184
UselessParentheses Useless parentheses around `pos - 1`. 4 2239
CollapsibleIfStatements This if statement could be combined with its parent 3 2528–2552
CollapsibleIfStatements This if statement could be combined with its parent 3 2956–2966
CollapsibleIfStatements This if statement could be combined with its parent 3 2957–2965
CollapsibleIfStatements This if statement could be combined with its parent 3 3033–3035
UnnecessaryReturn Unnecessary return statement 3 3100
UselessParentheses Useless parentheses around `ch == ' ' || ch == '\n' || ch == '\r' || ch == ...`. 4 3331

org/codehaus/plexus/util/xml/pull/MXSerializer.java

Rule Violation Priority Line
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 2 527
EmptyControlStatement Empty if statement 3 943–956
EmptyControlStatement Empty if statement 3 1004–1029
UnusedLocalVariable Avoid unused local variables such as 'ch'. 3 1047