The following document contains the results of PMD 5.0.2.
| Violation | Line |
|---|---|
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 71 |
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 102 |
| Line too long | 112 |
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 123 |
| A catch statement should never catch throwable since it includes errors. | 185 |
| An instanceof check is being performed on the caught exception. Create a separate catch clause for this exception type. | 191 |
| An instanceof check is being performed on the caught exception. Create a separate catch clause for this exception type. | 191 |
| Violation | Line |
|---|---|
| This class name ends with Test but contains no test cases | 34 - 362 |
| Variables that are final and static should be all capitals, 'logger' is not all capitals. | 37 |
| Field instance has the same name as a method | 59 |
| Singleton is not thread safe | 68 - 71 |
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 99 |
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 115 |
| JUnit 4 indicates test suites via annotations, not the suite method. | 139 - 144 |
| Local variable 'suite' could be declared final | 141 |
| Line too long | 184 |
| Avoid instantiating new objects inside loops | 187 |
| Local variable 'strings' could be declared final | 187 |
| Avoid instantiating new objects inside loops | 190 - 197 |
| Local variable 'failureMessage' could be declared final | 202 |
| Local variable 'missingFileIterator' could be declared final | 205 |
| Prefer StringBuffer over += for concatenating strings | 244 |
| Parameter 'file' is not assigned and could be declared final | 273 |
| Parameter 'file' is not assigned and could be declared final | 299 |
| Local variable 'directory' could be declared final | 315 |
| Avoid throwing raw exception types. | 318 |
| Local variable 'suffix' could be declared final | 332 |
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 336 |
| Avoid if (x != y) ..; else ..; | 348 |
| Assigning an Object to null is a code smell. Consider refactoring. | 360 |
| Violation | Line |
|---|---|
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 26 |
| Private field 'report' could be made final; it is only initialized in the declaration or constructor. | 31 |
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 31 |
| Private field 'reportWriter' could be made final; it is only initialized in the declaration or constructor. | 36 |
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 36 |
| Avoid using redundant field initializer for 'testFailureIgnore' | 41 |
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 66 |
| Avoid using redundant field initializer for 'numberOfErrors' | 66 |
| Parameter 'test' is not assigned and could be declared final | 72 |
| Parameter 'throwable' is not assigned and could be declared final | 73 |
| Avoid using redundant field initializer for 'numberOfFailures' | 84 |
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 84 |
| Parameter 'test' is not assigned and could be declared final | 90 |
| Parameter 'failure' is not assigned and could be declared final | 91 |
| Parameter 'test' is not assigned and could be declared final | 102 |
| Document empty method | 103 - 104 |
| Avoid using redundant field initializer for 'numberOfTests' | 109 |
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 109 |
| Parameter 'test' is not assigned and could be declared final | 114 |
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 122 |
| Avoid using redundant field initializer for 'startTime' | 122 |
| Variables that are final and static should be all capitals, 'newLine' is not all capitals. | 127 |
| The String literal "-------------------------------------------------------------------------------" appears 4 times in this file; the first occurrence is on line 136 | 136 |
| Parameter 'test' is not assigned and could be declared final | 150 |
| Parameter 'throwable' is not assigned and could be declared final | 151 |
| Private field 'failures' could be made final; it is only initialized in the declaration or constructor. | 158 |
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 158 |
| Parameter 'test' is not assigned and could be declared final | 167 |
| Use explicit scoping instead of the default package private level | 167 - 230 |
| Useless parentheses. | 169 |
| StringBuffer constructor is initialized with size 16, but has at least 40 characters appended. | 170 |
| No need to call String.valueOf to append to a string. | 170 |
| StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. | 171 |
| StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. | 172 |
| Local variable 'ctr' could be declared final | 180 |
| Local variable 'comparator' could be declared final | 186 |
| Local variable 'comparator' could be declared final | 196 |
| Avoid throwing raw exception types. | 225 |
| Use explicit scoping instead of the default package private level | 237 |
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 237 |
| Use explicit scoping instead of the default package private level | 238 |
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 238 |
| Parameter 'testFailureIgnore' is not assigned and could be declared final | 260 |
| Violation | Line |
|---|---|
| The class 'CartridgeTestMojo' has a Cyclomatic Complexity of 22 (Highest = 21). | 24 - 193 |
| Avoid really long methods. | 30 - 192 |
| The method 'execute' has a Cyclomatic Complexity of 21. | 30 - 192 |
| The method execute() has an NPath complexity of 1201 | 30 - 192 |
| Avoid if (x != y) ..; else ..; | 33 - 191 |
| Avoid if (x != y) ..; else ..; | 50 - 70 |
| Avoid if (x != y) ..; else ..; | 54 - 70 |
| New exception is thrown in catch block, original stack trace may be lost | 67 - 68 |
| Avoid if (x != y) ..; else ..; | 73 - 93 |
| Avoid if (x != y) ..; else ..; | 77 - 93 |
| New exception is thrown in catch block, original stack trace may be lost | 90 - 91 |
| A catch statement should never catch throwable since it includes errors. | 168 |
| An instanceof check is being performed on the caught exception. Create a separate catch clause for this exception type. | 170 |
| Violation | Line |
|---|---|
| A catch statement should never catch throwable since it includes errors. | 53 |
| An instanceof check is being performed on the caught exception. Create a separate catch clause for this exception type. | 55 |
| A catch statement should never catch throwable since it includes errors. | 92 |
| An instanceof check is being performed on the caught exception. Create a separate catch clause for this exception type. | 98 |
| An instanceof check is being performed on the caught exception. Create a separate catch clause for this exception type. | 98 |
| Violation | Line |
|---|---|
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 19 |
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 20 |
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 21 |
| Avoid using redundant field initializer for 'binary' | 21 |
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 22 |
| Avoid using redundant field initializer for 'ignoreWhitespace' | 23 |
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 23 |
| Found non-transient, non-static member. Please mark as transient or provide accessors. | 24 |
| Avoid using redundant field initializer for 'ignoreLinesWithStrings' | 24 |
| Parameter 'testName' is not assigned and could be declared final | 36 |
| Parameter 'expectedFile' is not assigned and could be declared final | 37 |
| Parameter 'actualFile' is not assigned and could be declared final | 38 |
| Parameter 'binary' is not assigned and could be declared final | 39 |
| Parameter 'testName' is not assigned and could be declared final | 61 |
| Parameter 'expectedFile' is not assigned and could be declared final | 62 |
| Parameter 'actualFile' is not assigned and could be declared final | 63 |
| Parameter 'binary' is not assigned and could be declared final | 64 |
| Parameter 'ignoreWhitespace' is not assigned and could be declared final | 65 |
| Parameter 'ignoreLineEndings' is not assigned and could be declared final | 66 |
| Parameter 'ignoreLinesWithStrings' is not assigned and could be declared final | 67 |
| JUnit 4 tests that execute tests should use the @Test annotation | 78 - 87 |
| JUnit tests should not contain more than 1 assert(s). | 78 |
| JUnit tests should not contain more than 1 assert(s). | 93 |
| JUnit 4 tests that execute tests should use the @Test annotation | 93 - 141 |
| Local variable 'message' could be declared final | 97 |
| Line too long | 111 |
| A catch statement should never catch throwable since it includes errors. | 137 |
| Parameter 'patternList' is not assigned and could be declared final | 148 |
| Parameter 'input' is not assigned and could be declared final | 148 |
| Local variable 'pattern' could be declared final | 151 |