PMD Results

The following document contains the results of PMD 5.6.1.

Files

com/damnhandy/uri/template/DefaultVarExploder.java

Violation Line
Overridable method 'setSource' called during object construction 94
These nested if statements could be combined 183–186
Use opposite operator instead of the logic complement operator. 183
Avoid using if statements without curly braces 219–220
Deeply nested if..then statements are hard to read 255–260

com/damnhandy/uri/template/Expression.java

Violation Line
Overridable method 'toString' called during object construction 283
Private field 'operator' could be made final; it is only initialized in the declaration or constructor. 511
Private field 'varSpecs' could be made final; it is only initialized in the declaration or constructor. 516

com/damnhandy/uri/template/Literal.java

Violation Line
Overridable method 'getValue' called during object construction 34

com/damnhandy/uri/template/UriTemplate.java

Violation Line
Possible God class (WMC=145, ATFD=88, TCC=0.02217741935483871) 16–1159
Avoid if (x != y) ..; else ..; 588–598
These nested if statements could be combined 623–644
Avoid unnecessary if..then..else statements when returning booleans 739–742
Avoid unnecessary if..then..else statements when returning booleans 766–777
Avoid unnecessary if..then..else statements when returning booleans 851–854
Avoid reassigning parameters such as 'variable' 936
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 1037
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 1068
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 1081

com/damnhandy/uri/template/UriTemplateBuilderException.java

Violation Line
Document empty constructor 24–27

com/damnhandy/uri/template/impl/UriTemplateParser.java

Violation Line
Private field 'components' could be made final; it is only initialized in the declaration or constructor. 45

com/damnhandy/uri/template/impl/VarSpec.java

Violation Line
Avoid if (x != y) ..; else ..; 172–195