The following document contains the results of PMD 4.2.5.
| Violation | Line |
|---|---|
| Return an empty array rather than null. | 93 - 95 |
| Violation | Line |
|---|---|
| The String literal "unchecked" appears 5 times in this file; the first occurrence is on line 63 | 63 |
| Violation | Line |
|---|---|
| Avoid reassigning parameters such as 'aFilter' | 50 |
| Violation | Line |
|---|---|
| Avoid if (x != y) ..; else ..; | 99 - 106 |
| Substitute calls to size() == 0 (or size() != 0) with calls to isEmpty() | 99 |
| Avoid unnecessary if..then..else statements when returning a boolean | 100 - 104 |
| Avoid if (x != y) ..; else ..; | 116 - 123 |
| Substitute calls to size() == 0 (or size() != 0) with calls to isEmpty() | 116 |
| Avoid unnecessary if..then..else statements when returning a boolean | 117 - 121 |
| Violation | Line |
|---|---|
| Avoid if (x != y) ..; else ..; | 139 - 154 |
| Avoid if (x != y) ..; else ..; | 452 - 456 |
| Position literals first in String comparisons | 457 |
| Position literals first in String comparisons | 458 |
| Position literals first in String comparisons | 459 |
| Avoid if (x != y) ..; else ..; | 464 - 473 |
| Violation | Line |
|---|---|
| The String literal " - " appears 4 times in this file; the first occurrence is on line 615 | 615 |
| Violation | Line |
|---|---|
| New exception is thrown in catch block, original stack trace may be lost | 55 - 56 |
| New exception is thrown in catch block, original stack trace may be lost | 59 - 60 |
| Use equals() to compare strings instead of '==' or '!=' | 77 |
| These nested if statements could be combined | 78 - 80 |
| Deeply nested if..then statements are hard to read | 78 - 80 |
| Use equals() to compare strings instead of '==' or '!=' | 82 |
| These nested if statements could be combined | 134 - 137 |
| The String literal "FieldDataInvalidException" appears 7 times in this file; the first occurrence is on line 287 | 287 |
| The String literal "FieldDataInvalidException: " appears 7 times in this file; the first occurrence is on line 289 | 289 |
| New exception is thrown in catch block, original stack trace may be lost | 482 |
| Violation | Line |
|---|---|
| New exception is thrown in catch block, original stack trace may be lost | 56 - 57 |
| New exception is thrown in catch block, original stack trace may be lost | 60 - 61 |
| Use equals() to compare strings instead of '==' or '!=' | 79 |
| These nested if statements could be combined | 80 - 82 |
| Deeply nested if..then statements are hard to read | 80 - 82 |
| Use equals() to compare strings instead of '==' or '!=' | 84 |
| These nested if statements could be combined | 135 - 141 |
| Deeply nested if..then statements are hard to read | 137 - 139 |
| The String literal "FieldDataInvalidException" appears 14 times in this file; the first occurrence is on line 291 | 291 |
| New exception is thrown in catch block, original stack trace may be lost | 486 |
| Violation | Line |
|---|---|
| Perhaps 'CODE_ALBUM_ARTIST' could be replaced by a local variable. | 71 |
| Private field 'V2_CODE_DISC_NUMBER' could be made final; it is only initialized in the declaration or constructor. | 72 |
| New exception is thrown in catch block, original stack trace may be lost | 94 - 95 |
| New exception is thrown in catch block, original stack trace may be lost | 98 - 99 |
| New exception is thrown in catch block, original stack trace may be lost | 103 - 104 |
| New exception is thrown in catch block, original stack trace may be lost | 108 - 109 |
| New exception is thrown in catch block, original stack trace may be lost | 112 - 113 |
| Avoid if (x != y) ..; else ..; | 136 - 149 |
| String.trim().length()==0 is an inefficient way to validate an empty String. | 290 |
| String.indexOf(char) is faster than String.indexOf(String). | 304 |
| String.indexOf(char) is faster than String.indexOf(String). | 306 |
| Violation | Line |
|---|---|
| Use block level rather than method level synchronization | 300 - 309 |
| Use block level rather than method level synchronization | 315 - 335 |
| Non-static initializers are confusing | 419 - 422 |
| Violation | Line |
|---|---|
| Avoid unnecessary comparisons in boolean expressions | 61 |
| These nested if statements could be combined | 75 - 77 |
| Violation | Line |
|---|---|
| Use equals() to compare strings instead of '==' or '!=' | 953 |
| Avoid if (x != y) ..; else ..; | 974 - 989 |
| These nested if statements could be combined | 1528 - 1531 |
| Avoid if (x != y) ..; else ..; | 1698 - 1712 |
| Use equals() to compare strings instead of '==' or '!=' | 1802 |
| An empty statement (semicolon) not part of a loop | 1859 |
| Violation | Line |
|---|---|
| Avoid reassigning parameters such as 'volume' | 1041 |
| Avoid reassigning parameters such as 'volume' | 1041 |
| Violation | Line |
|---|---|
| StringBuffer.append is called 2 consecutive times with literal Strings. Use a single append with a single String. | 62 |
| StringBuffer.append is called 2 consecutive times with literal Strings. Use a single append with a single String. | 62 |
| Violation | Line |
|---|---|
| StringBuffer.append is called 2 consecutive times with literal Strings. Use a single append with a single String. | 61 |
| StringBuffer.append is called 2 consecutive times with literal Strings. Use a single append with a single String. | 61 |
| Violation | Line |
|---|---|
| Perhaps 'panel' could be replaced by a local variable. | 88 |
| Perhaps 'settings' could be replaced by a local variable. | 92 |
| When doing a String.toLowerCase()/toUpperCase() call, use a Locale | 423 |
| New exception is thrown in catch block, original stack trace may be lost | 506 |
| New exception is thrown in catch block, original stack trace may be lost | 510 |
| New exception is thrown in catch block, original stack trace may be lost | 514 |
| When doing a String.toLowerCase()/toUpperCase() call, use a Locale | 569 |
| Violation | Line |
|---|---|
| Private field 'webImagePreview' could be made final; it is only initialized in the declaration or constructor. | 83 |
| Private field 'header' could be made final; it is only initialized in the declaration or constructor. | 84 |
| Perhaps 'buttonCancel' could be replaced by a local variable. | 86 |
| Perhaps 'buttonSave' could be replaced by a local variable. | 87 |
| Private field 'genreField' could be made final; it is only initialized in the declaration or constructor. | 88 |
| Perhaps 'buttonBar' could be replaced by a local variable. | 89 |
| Private field 'tagTable' could be made final; it is only initialized in the declaration or constructor. | 91 |
| Private field 'artistField' could be made final; it is only initialized in the declaration or constructor. | 92 |
| Private field 'discField' could be made final; it is only initialized in the declaration or constructor. | 93 |
| Private field 'yearField' could be made final; it is only initialized in the declaration or constructor. | 94 |
| Violation | Line |
|---|---|
| Possible unsafe assignment to a non-final static field in a constructor. | 91 |
| An empty statement (semicolon) not part of a loop | 362 |
| Violation | Line |
|---|---|
| Perhaps 'panel' could be replaced by a local variable. | 63 |
| Violation | Line |
|---|---|
| Logger should be defined private static final and have the correct class | 64 |
| Perhaps 'buttonBar' could be replaced by a local variable. | 74 |
| Perhaps 'list' could be replaced by a local variable. | 76 |
| New exception is thrown in catch block, original stack trace may be lost | 458 |
| Violation | Line |
|---|---|
| Logger should be defined private static final and have the correct class | 73 |
| Perhaps 'buttonBar' could be replaced by a local variable. | 82 |
| Private field 'addDiscMenu' could be made final; it is only initialized in the declaration or constructor. | 90 |
| Perhaps 'addDiscMenu' could be replaced by a local variable. | 90 |
| These nested if statements could be combined | 404 - 430 |
| An empty statement (semicolon) not part of a loop | 410 |
| New exception is thrown in catch block, original stack trace may be lost | 441 |
| Violation | Line |
|---|---|
| Perhaps 'buttonApply' could be replaced by a local variable. | 50 |
| Perhaps 'buttonClose' could be replaced by a local variable. | 51 |
| Perhaps 'settings' could be replaced by a local variable. | 55 |
| Ensure that resources like this Connection object are closed after use | 89 |
| Violation | Line |
|---|---|
| Perhaps 'buttonClose' could be replaced by a local variable. | 41 |
| Perhaps 'buttonBar' could be replaced by a local variable. | 42 |
| Violation | Line |
|---|---|
| Perhaps 'buttonBar' could be replaced by a local variable. | 85 |
| New exception is thrown in catch block, original stack trace may be lost | 460 |
| Violation | Line |
|---|---|
| Perhaps 'buttonClose' could be replaced by a local variable. | 27 |
| Perhaps 'buttonBar' could be replaced by a local variable. | 28 |
| Violation | Line |
|---|---|
| Private field 'webImagePreview' could be made final; it is only initialized in the declaration or constructor. | 87 |
| Perhaps 'buttonCancel' could be replaced by a local variable. | 90 |
| Perhaps 'buttonSave' could be replaced by a local variable. | 91 |
| Private field 'genreField' could be made final; it is only initialized in the declaration or constructor. | 92 |
| Perhaps 'buttonBar' could be replaced by a local variable. | 93 |
| Private field 'artistField' could be made final; it is only initialized in the declaration or constructor. | 96 |
| Private field 'discField' could be made final; it is only initialized in the declaration or constructor. | 97 |
| Private field 'yearField' could be made final; it is only initialized in the declaration or constructor. | 98 |
| Avoid if (x != y) ..; else ..; | 234 - 284 |
| Violation | Line |
|---|---|
| Perhaps 'buttonBar' could be replaced by a local variable. | 87 |
| Perhaps 'list' could be replaced by a local variable. | 89 |
| Private field 'endpointsCombo' could be made final; it is only initialized in the declaration or constructor. | 99 |
| Avoid unused local variables such as 'row'. | 332 |
| New exception is thrown in catch block, original stack trace may be lost | 506 |
| Violation | Line |
|---|---|
| Logger should be defined private static final and have the correct class | 62 |
| Perhaps 'buttonBar' could be replaced by a local variable. | 66 |
| Perhaps 'settings' could be replaced by a local variable. | 69 |
| Private field 'file' could be made final; it is only initialized in the declaration or constructor. | 71 |
| New exception is thrown in catch block, original stack trace may be lost | 303 |
| Substitute calls to size() == 0 (or size() != 0) with calls to isEmpty() | 357 |
| Substitute calls to size() == 0 (or size() != 0) with calls to isEmpty() | 384 |
| Avoid if (x != y) ..; else ..; | 465 - 474 |
| Avoid reassigning parameters such as 'aString' | 484 |
| Avoid reassigning parameters such as 'aString' | 484 |
| Avoid reassigning parameters such as 'aString' | 484 |
| Avoid reassigning parameters such as 'aString' | 484 |
| Avoid reassigning parameters such as 'aString' | 484 |
| Avoid reassigning parameters such as 'aString' | 484 |
| Avoid reassigning parameters such as 'aString' | 484 |
| Avoid reassigning parameters such as 'aString' | 484 |
| Avoid reassigning parameters such as 'aString' | 484 |
| Avoid reassigning parameters such as 'aString' | 484 |
| Violation | Line |
|---|---|
| Logger should be defined private static final and have the correct class | 69 |
| Perhaps 'buttonBar' could be replaced by a local variable. | 73 |
| Perhaps 'settings' could be replaced by a local variable. | 75 |
| StringBuffers can grow quite a lot, and so may become a source of memory leak (if the owning class has a long life time). | 324 |
| New exception is thrown in catch block, original stack trace may be lost | 349 |
| When instantiating a SimpleDateFormat object, specify a Locale | 357 |
| New exception is thrown in catch block, original stack trace may be lost | 372 |
| The String literal "XML Import: Truncate String - " appears 7 times in this file; the first occurrence is on line 381 | 381 |
| New exception is thrown in catch block, original stack trace may be lost | 409 |
| The String literal "Import XML: " appears 12 times in this file; the first occurrence is on line 430 | 430 |
| New exception is thrown in catch block, original stack trace may be lost | 473 |
| These nested if statements could be combined | 549 - 551 |
| Violation | Line |
|---|---|
| Perhaps 'disclistScrollPane' could be replaced by a local variable. | 75 |
| Perhaps 'disclistModel' could be replaced by a local variable. | 77 |
| Violation | Line |
|---|---|
| Perhaps 'artistPanel' could be replaced by a local variable. | 72 |
| These nested if statements could be combined | 164 - 166 |
| Deeply nested if..then statements are hard to read | 164 - 166 |
| Violation | Line |
|---|---|
| Perhaps 'discPanel' could be replaced by a local variable. | 102 |
| Perhaps 'trackList' could be replaced by a local variable. | 106 |
| Perhaps 'tracks' could be replaced by a local variable. | 112 |
| An empty statement (semicolon) not part of a loop | 192 |
| These nested if statements could be combined | 202 - 204 |
| Deeply nested if..then statements are hard to read | 202 - 204 |
| The String literal "messages.discnotexists" appears 4 times in this file; the first occurrence is on line 234 | 234 |
| Avoid printStackTrace(); use a logger call instead. | 276 |
| These nested if statements could be combined | 420 - 424 |
| These nested if statements could be combined | 434 - 437 |
| These nested if statements could be combined | 441 - 444 |
| These nested if statements could be combined | 580 - 584 |
| These nested if statements could be combined | 615 - 618 |
| Violation | Line |
|---|---|
| Perhaps 'trackPanel' could be replaced by a local variable. | 67 |
| The String literal "messages.editorerrors" appears 4 times in this file; the first occurrence is on line 154 | 154 |
| These nested if statements could be combined | 267 - 269 |
| Deeply nested if..then statements are hard to read | 267 - 269 |
| Violation | Line |
|---|---|
| Perhaps 'filterPanel' could be replaced by a local variable. | 61 |
| Perhaps 'scrollPane' could be replaced by a local variable. | 62 |
| When doing a String.toLowerCase()/toUpperCase() call, use a Locale | 145 |
| When doing a String.toLowerCase()/toUpperCase() call, use a Locale | 147 |
| When doing a String.toLowerCase()/toUpperCase() call, use a Locale | 157 |
| When doing a String.toLowerCase()/toUpperCase() call, use a Locale | 159 |
| When doing a String.toLowerCase()/toUpperCase() call, use a Locale | 166 |
| When doing a String.toLowerCase()/toUpperCase() call, use a Locale | 168 |
| Violation | Line |
|---|---|
| A switch with less than 3 branches is inefficient, use a if statement instead. | 279 - 295 |
| Violation | Line |
|---|---|
| Perhaps 'navigationPanel' could be replaced by a local variable. | 96 |
| Avoid if (x != y) ..; else ..; | 186 - 198 |
| Use block level rather than method level synchronization | 579 - 581 |
| Use block level rather than method level synchronization | 588 - 590 |
| Avoid if (x != y) ..; else ..; | 687 - 699 |
| Avoid if (x != y) ..; else ..; | 717 - 721 |
| Violation | Line |
|---|---|
| Perhaps 'listScrollPane' could be replaced by a local variable. | 80 |
| Perhaps 'listModel' could be replaced by a local variable. | 84 |
| Violation | Line |
|---|---|
| Avoid empty catch blocks | 269 - 271 |
| Use block level rather than method level synchronization | 322 - 328 |
| Violation | Line |
|---|---|
| Perhaps 'lafPanel' could be replaced by a local variable. | 51 |
| Violation | Line |
|---|---|
| Perhaps 'settings' could be replaced by a local variable. | 27 |
| Violation | Line |
|---|---|
| Perhaps 'file' could be replaced by a local variable. | 34 |
| Violation | Line |
|---|---|
| Perhaps 'file' could be replaced by a local variable. | 47 |
| Violation | Line |
|---|---|
| These nested if statements could be combined | 121 - 123 |
| An operation on an Immutable object (String, BigDecimal or BigInteger) won't change the object itself | 122 |
| The String literal "Exception caught updating tags: " appears 5 times in this file; the first occurrence is on line 162 | 162 |
| Violation | Line |
|---|---|
| String.indexOf(char) is faster than String.indexOf(String). | 85 |
| String.indexOf(char) is faster than String.indexOf(String). | 86 |
| String.indexOf(char) is faster than String.indexOf(String). | 87 |
| String.indexOf(char) is faster than String.indexOf(String). | 88 |
| String.indexOf(char) is faster than String.indexOf(String). | 89 |
| String.indexOf(char) is faster than String.indexOf(String). | 90 |
| String.indexOf(char) is faster than String.indexOf(String). | 91 |
| String.indexOf(char) is faster than String.indexOf(String). | 92 |
| String.indexOf(char) is faster than String.indexOf(String). | 93 |
| String.indexOf(char) is faster than String.indexOf(String). | 94 |
| String.indexOf(char) is faster than String.indexOf(String). | 95 |
| String.indexOf(char) is faster than String.indexOf(String). | 96 |
| Violation | Line |
|---|---|
| Unnecessary final modifier in final class | 42 - 53 |
| Violation | Line |
|---|---|
| An Interface should be used only to model a behaviour; consider converting this to a class. | 123 - 139 |
| Violation | Line |
|---|---|
| Avoid if (x != y) ..; else ..; | 277 - 340 |
| These nested if statements could be combined | 462 - 464 |
| These nested if statements could be combined | 473 - 475 |
| Violation | Line |
|---|---|
| Private field 'releaseDate' could be made final; it is only initialized in the declaration or constructor. | 28 |
| Violation | Line |
|---|---|
| A class which only has private constructors should be final | 53 - 295 |
| When doing a String.toLowerCase()/toUpperCase() call, use a Locale | 104 |
| When instantiating a SimpleDateFormat object, specify a Locale | 199 |
| Avoid appending characters as strings in StringBuffer.append. | 223 |
| Avoid appending characters as strings in StringBuffer.append. | 226 |
| Consider simply returning the value vs storing it in local variable 'cannoical' | 230 |
| Avoid empty catch blocks | 275 - 276 |
| Switch statements should have a default label | 278 - 291 |
| A switch with less than 3 branches is inefficient, use a if statement instead. | 278 - 291 |