PMD Results

The following document contains the results of PMD.

Summary

Files Errors
30 132

Files

Files Violations
nl/hippo/client/webdav/AbstractWebdavConfig.java 1
nl/hippo/client/webdav/DocumentPathImpl.java 10
nl/hippo/client/webdav/HttpClientPool.java 1
nl/hippo/client/webdav/WebdavConfig.java 1
nl/hippo/client/webdav/WebdavRequest.java 1
nl/hippo/client/webdav/WebdavResponse.java 3
nl/hippo/client/webdav/binding/content/DocumentCollectionImpl.java 2
nl/hippo/client/webdav/binding/content/DocumentFactory.java 1
nl/hippo/client/webdav/binding/content/DocumentImpl.java 1
nl/hippo/client/webdav/binding/content/DocumentMarshaller.java 5
nl/hippo/client/webdav/binding/content/DocumentMetadataImpl.java 4
nl/hippo/client/webdav/binding/facets/FacetCollectionImpl.java 3
nl/hippo/client/webdav/binding/facets/FacetFactory.java 1
nl/hippo/client/webdav/binding/facets/FacetImpl.java 2
nl/hippo/client/webdav/binding/facets/FacetValueImpl.java 2
nl/hippo/client/webdav/binding/facets/FacetsMarshaller.java 6
nl/hippo/client/webdav/caching/EventValidityCalculator.java 9
nl/hippo/client/webdav/caching/WebdavCacheHandler.java 1
nl/hippo/client/webdav/caching/WebdavCacheKey.java 1
nl/hippo/client/webdav/method/ContentIncluder.java 7
nl/hippo/client/webdav/method/SearchDocumentById.java 2
nl/hippo/client/webdav/method/WebdavMethod.java 4
nl/hippo/client/webdav/service/WebdavServiceImpl.java 1
nl/hippo/client/webdav/utils/Interpolation.java 1
nl/hippo/client/webdav/utils/XslTransformer.java 1
nl/hippo/client/webdav/DocumentPathTest.java 13
nl/hippo/client/webdav/WebDavConfigTest.java 5
nl/hippo/client/webdav/binding/content/SearchResultBindingTest.java 7
nl/hippo/client/webdav/binding/facets/FacetsResultBindingTest.java 3
nl/hippo/client/webdav/caching/EventValidityCalculatorTest.java 33

nl/hippo/client/webdav/AbstractWebdavConfig.java

Violation Line
Document empty constructor - details... 56

nl/hippo/client/webdav/DocumentPathImpl.java

Violation Line
Avoid if (x != y) ..; else ..; - details... 75
Position literals first in String comparisons - details... 76
Avoid if (x != y) ..; else ..; - details... 82
Avoid reassigning parameters such as 'path' - details... 120
Avoid reassigning parameters such as 'path' - details... 120
Avoid reassigning parameters such as 'path' - details... 120
Avoid reassigning parameters such as 'path' - details... 120
Avoid if (x != y) ..; else ..; - details... 184
Avoid if (x != y) ..; else ..; - details... 194
Avoid if (x != y) ..; else ..; - details... 210

nl/hippo/client/webdav/HttpClientPool.java

Violation Line
Avoid reassigning parameters such as 'obj' - details... 94

nl/hippo/client/webdav/WebdavConfig.java

Violation Line
Avoid if (x != y) ..; else ..; - details... 85

nl/hippo/client/webdav/WebdavRequest.java

Violation Line
Avoid if (x != y) ..; else ..; - details... 100

nl/hippo/client/webdav/WebdavResponse.java

Violation Line
Avoid if (x != y) ..; else ..; - details... 173
Avoid if (x != y) ..; else ..; - details... 210
Consider simply returning the value vs storing it in local variable 'hash' - details... 224

nl/hippo/client/webdav/binding/content/DocumentCollectionImpl.java

Violation Line
Avoid using implementation types like 'ArrayList'; use the interface instead - details... 34
Avoid if (x != y) ..; else ..; - details... 63

nl/hippo/client/webdav/binding/content/DocumentFactory.java

Violation Line
Private field 'config' could be made final; it is only initialized in the declaration or constructor. - details... 70

nl/hippo/client/webdav/binding/content/DocumentImpl.java

Violation Line
Avoid unnecessary comparisons in boolean expressions - details... 76

nl/hippo/client/webdav/binding/content/DocumentMarshaller.java

Violation Line
The class 'DocumentMarshaller' has a Cyclomatic Complexity of 4 (Highest = 10). - details... 37
The method 'marshal' has a Cyclomatic Complexity of 10. - details... 149
Avoid if (x != y) ..; else ..; - details... 152
Avoid if (x != y) ..; else ..; - details... 154
Caught exception is rethrown, original stack trace may be lost - details... 185

nl/hippo/client/webdav/binding/content/DocumentMetadataImpl.java

Violation Line
Avoid using implementation types like 'HashSet'; use the interface instead - details... 38
Private field 'properties' could be made final; it is only initialized in the declaration or constructor. - details... 38
Avoid using implementation types like 'HashSet'; use the interface instead - details... 41
Avoid unnecessary comparisons in boolean expressions - details... 181

nl/hippo/client/webdav/binding/facets/FacetCollectionImpl.java

Violation Line
Avoid using implementation types like 'HashMap'; use the interface instead - details... 32
Avoid using implementation types like 'HashMap'; use the interface instead - details... 37
Avoid unnecessary comparisons in boolean expressions - details... 55

nl/hippo/client/webdav/binding/facets/FacetFactory.java

Violation Line
Private field 'config' could be made final; it is only initialized in the declaration or constructor. - details... 56

nl/hippo/client/webdav/binding/facets/FacetImpl.java

Violation Line
Avoid using implementation types like 'ArrayList'; use the interface instead - details... 33
Avoid unnecessary comparisons in boolean expressions - details... 64

nl/hippo/client/webdav/binding/facets/FacetValueImpl.java

Violation Line
Class cannot be instantiated and does not provide any static methods or fields - details... 25
Avoid unnecessary comparisons in boolean expressions - details... 48

nl/hippo/client/webdav/binding/facets/FacetsMarshaller.java

Violation Line
Avoid unused constructor parameters such as 'index'. - details... 47
Avoid unused constructor parameters such as 'name'. - details... 47
Avoid unused constructor parameters such as 'uri'. - details... 47
Document empty constructor - details... 47
Avoid if (x != y) ..; else ..; - details... 155
Avoid if (x != y) ..; else ..; - details... 157

nl/hippo/client/webdav/caching/EventValidityCalculator.java

Violation Line
Avoid unused private fields such as 'calculator'. - details... 40
Private field 'xpp' could be made final; it is only initialized in the declaration or constructor. - details... 71
Substitute calls to size() == 0 (or size() != 0) with calls to isEmpty() - details... 99
These nested if statements could be combined - details... 124
StringBuffer constructor is initialized with size 16, but has at least 17 characters appended. - details... 170
Avoid appending characters as strings in StringBuffer.append. - details... 173
Avoid appending characters as strings in StringBuffer.append. - details... 173
Avoid appending characters as strings in StringBuffer.append. - details... 175
Avoid appending characters as strings in StringBuffer.append. - details... 175

nl/hippo/client/webdav/caching/WebdavCacheHandler.java

Violation Line
Private field 'cache' could be made final; it is only initialized in the declaration or constructor. - details... 36

nl/hippo/client/webdav/caching/WebdavCacheKey.java

Violation Line
No need to check for null before an instanceof - details... 52

nl/hippo/client/webdav/method/ContentIncluder.java

Violation Line
The class 'ContentIncluder' has a Cyclomatic Complexity of 8 (Highest = 18). - details... 41
Private field 'webdavService' could be made final; it is only initialized in the declaration or constructor. - details... 48
Private field 'cacheHandler' could be made final; it is only initialized in the declaration or constructor. - details... 49
Avoid reassigning parameters such as 'searchResult' - details... 62
The String literal "Error merging content into searchResult" appears 5 times in this file; the first occurrence is on line 78 - details... 78
The method 'writeToken' has a Cyclomatic Complexity of 18. - details... 107
Switch statements should have a default label - details... 110

nl/hippo/client/webdav/method/SearchDocumentById.java

Violation Line
Caught exception is rethrown, original stack trace may be lost - details... 46
Deeply nested if..then statements are hard to read - details... 77

nl/hippo/client/webdav/method/WebdavMethod.java

Violation Line
The class 'WebdavMethod' has a Cyclomatic Complexity of 5 (Highest = 12). - details... 36
The method 'execute' has a Cyclomatic Complexity of 12. - details... 99
The method execute() has an NPath complexity of 280 - details... 99
Avoid using exceptions as flow control. - details... 143

nl/hippo/client/webdav/service/WebdavServiceImpl.java

Violation Line
String.indexOf(char) is faster than String.indexOf(String). - details... 169

nl/hippo/client/webdav/utils/Interpolation.java

Violation Line
All methods are static. Consider using Singleton instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. - details... 16

nl/hippo/client/webdav/utils/XslTransformer.java

Violation Line
Private field 'listeners' could be made final; it is only initialized in the declaration or constructor. - details... 133

nl/hippo/client/webdav/DocumentPathTest.java

Violation Line
JUnit tests should include assert() or fail() - details... 23
JUnit tests should include assert() or fail() - details... 28
JUnit tests should include assert() or fail() - details... 34
JUnit tests should include assert() or fail() - details... 39
JUnit tests should include assert() or fail() - details... 45
JUnit tests should include assert() or fail() - details... 51
JUnit tests should include assert() or fail() - details... 57
JUnit tests should include assert() or fail() - details... 63
The String literal "Expected IllegalArgumentException" appears 4 times in this file; the first occurrence is on line 72 - details... 72
JUnit assertions should include a message - details... 74
JUnit assertions should include a message - details... 86
JUnit assertions should include a message - details... 98
JUnit assertions should include a message - details... 110

nl/hippo/client/webdav/WebDavConfigTest.java

Violation Line
JUnit assertions should include a message - details... 62
JUnit assertions should include a message - details... 63
JUnit assertions should include a message - details... 64
JUnit assertions should include a message - details... 65
JUnit assertions should include a message - details... 66

nl/hippo/client/webdav/binding/content/SearchResultBindingTest.java

Violation Line
Avoid unused imports such as 'java.io.IOException' - details... 19
Avoid unused imports such as 'java.io.IOException' - details... 19
Avoid unused imports such as 'nl.hippo.client.api.ClientException' - details... 23
Avoid unused imports such as 'nl.hippo.client.api.ClientException' - details... 23
No need to import a type that lives in the same package - details... 24
No need to import a type that lives in the same package - details... 24
JUnit tests should include assert() or fail() - details... 49

nl/hippo/client/webdav/binding/facets/FacetsResultBindingTest.java

Violation Line
No need to import a type that lives in the same package - details... 23
No need to import a type that lives in the same package - details... 23
JUnit tests should include assert() or fail() - details... 49

nl/hippo/client/webdav/caching/EventValidityCalculatorTest.java

Violation Line
Document empty method - details... 31
The String literal "UTF-8" appears 7 times in this file; the first occurrence is on line 37 - details... 37
The String literal "default" appears 7 times in this file; the first occurrence is on line 40 - details... 40
The String literal "files/default.preview/" appears 7 times in this file; the first occurrence is on line 41 - details... 41
The String literal "/aap/noot/mies" appears 5 times in this file; the first occurrence is on line 44 - details... 44
The String literal "TEST" appears 7 times in this file; the first occurrence is on line 46 - details... 46
JUnit assertions should include a message - details... 50
JUnit assertions should include a message - details... 51
JUnit assertions should include a message - details... 52
Use assertSame(x, y) instead of assertTrue(x==y), or assertNotSame(x,y) vs assertFalse(x==y) - details... 52
JUnit assertions should include a message - details... 71
JUnit assertions should include a message - details... 72
JUnit assertions should include a message - details... 73
Use assertSame(x, y) instead of assertTrue(x==y), or assertNotSame(x,y) vs assertFalse(x==y) - details... 73
JUnit assertions should include a message - details... 92
JUnit assertions should include a message - details... 93
JUnit assertions should include a message - details... 94
Use assertSame(x, y) instead of assertTrue(x==y), or assertNotSame(x,y) vs assertFalse(x==y) - details... 94
JUnit assertions should include a message - details... 113
JUnit assertions should include a message - details... 114
JUnit assertions should include a message - details... 115
Use assertSame(x, y) instead of assertTrue(x==y), or assertNotSame(x,y) vs assertFalse(x==y) - details... 115
JUnit assertions should include a message - details... 134
JUnit assertions should include a message - details... 135
Use assertSame(x, y) instead of assertTrue(x==y), or assertNotSame(x,y) vs assertFalse(x==y) - details... 135
JUnit assertions should include a message - details... 155
JUnit assertions should include a message - details... 156
JUnit assertions should include a message - details... 157
Use assertSame(x, y) instead of assertTrue(x==y), or assertNotSame(x,y) vs assertFalse(x==y) - details... 157
JUnit assertions should include a message - details... 177
JUnit assertions should include a message - details... 178
JUnit assertions should include a message - details... 179
Use assertSame(x, y) instead of assertTrue(x==y), or assertNotSame(x,y) vs assertFalse(x==y) - details... 179