The following document contains the results of PMD 6.13.0.
Rule | Violation | Line |
---|---|---|
ClassNamingConventions | The utility class name 'NewsLetterConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 41–163 |
Rule | Violation | Line |
---|---|---|
AvoidThrowingRawExceptionTypes | Avoid throwing raw exception types. | 1962 |
AvoidFileStream | Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter | 2501 |
Rule | Violation | Line |
---|---|---|
AvoidFileStream | Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter | 533 |
AvoidFileStream | Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter | 633 |
Rule | Violation | Line |
---|---|---|
IntegerInstantiation | Avoid instantiating Integer objects. Call Integer.valueOf() instead. | 267 |
Rule | Violation | Line |
---|---|---|
IntegerInstantiation | Avoid instantiating Integer objects. Call Integer.valueOf() instead. | 277 |
Rule | Violation | Line |
---|---|---|
MissingOverride | The method 'delete(int, int, Plugin)' is missing an @Override annotation. | 59–68 |
MissingOverride | The method 'exists(int, int, Plugin)' is missing an @Override annotation. | 81–94 |
MissingOverride | The method 'insert(int, int, Plugin)' is missing an @Override annotation. | 106–115 |
Rule | Violation | Line |
---|---|---|
TooManyMethods | This class has too many methods, consider refactoring it. | 50–265 |
Rule | Violation | Line |
---|---|---|
LooseCoupling | Avoid using implementation types like 'ArrayList'; use the interface instead | 117 |
LooseCoupling | Avoid using implementation types like 'ArrayList'; use the interface instead | 117 |
Rule | Violation | Line |
---|---|---|
TooManyFields | Too many fields | 46–445 |
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 77–86 |
MissingOverride | The method 'getWorkgroup()' is missing an @Override annotation. | 326–329 |
MissingOverride | The method 'getResourceId()' is missing an @Override annotation. | 410–413 |
AddEmptyString | Do not add empty strings | 412 |
MissingOverride | The method 'getResourceTypeCode()' is missing an @Override annotation. | 420–423 |
Rule | Violation | Line |
---|---|---|
TooManyMethods | This class has too many methods, consider refactoring it. | 50–527 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 258 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 315 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 468–476 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 498–506 |
Rule | Violation | Line |
---|---|---|
TooManyMethods | This class has too many methods, consider refactoring it. | 49–316 |
Rule | Violation | Line |
---|---|---|
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 62–69 |
MissingOverride | The method 'getWorkgroup()' is missing an @Override annotation. | 181–184 |
MissingOverride | The method 'getResourceId()' is missing an @Override annotation. | 202–205 |
MissingOverride | The method 'getResourceTypeCode()' is missing an @Override annotation. | 212–215 |
Rule | Violation | Line |
---|---|---|
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 73 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 134 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 274 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 311–319 |
Rule | Violation | Line |
---|---|---|
MissingOverride | The method 'load(Plugin)' is missing an @Override annotation. | 57–83 |
MissingOverride | The method 'store(NewsLetterProperties, Plugin)' is missing an @Override annotation. | 93–102 |
Rule | Violation | Line |
---|---|---|
ShortVariable | Avoid variables with short names like id | 63 |
Rule | Violation | Line |
---|---|---|
MissingOverride | The method 'canBeRemoved(String)' is missing an @Override annotation. | 58–76 |
MissingOverride | The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. | 87–91 |
Rule | Violation | Line |
---|---|---|
MissingOverride | The method 'canBeRemoved(String)' is missing an @Override annotation. | 58–76 |
MissingOverride | The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. | 87–91 |
Rule | Violation | Line |
---|---|---|
ImmutableField | Private field '_first' could be made final; it is only initialized in the declaration or constructor. | 48 |
ImmutableField | Private field '_second' could be made final; it is only initialized in the declaration or constructor. | 49 |
Rule | Violation | Line |
---|---|---|
MissingOverride | The method 'insert(SendingNewsLetter, Plugin)' is missing an @Override annotation. | 68–83 |
MissingOverride | The method 'delete(int, Plugin)' is missing an @Override annotation. | 93–99 |
MissingOverride | The method 'load(int, Plugin)' is missing an @Override annotation. | 110–133 |
MissingOverride | The method 'store(SendingNewsLetter, Plugin)' is missing an @Override annotation. | 143–150 |
DefaultPackage | Use explicit scoping instead of the default package private level | 161–177 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the checkPrimaryKey method if you want a default access modifier | 161–177 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the newPrimaryKey method if you want a default access modifier | 186–204 |
DefaultPackage | Use explicit scoping instead of the default package private level | 186–204 |
MissingOverride | The method 'selectLastSendingForNewsletterId(int, Plugin)' is missing an @Override annotation. | 215–237 |
MissingOverride | The method 'selectAllLastSendingForNewsletterId(int, Plugin)' is missing an @Override annotation. | 248–272 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 251 |
MissingOverride | The method 'findAllSendings(Plugin)' is missing an @Override annotation. | 281–304 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 283 |
MissingOverride | The method 'findSendingsByIds(ArrayList, Plugin)' is missing an @Override annotation. | 315–340 |
LooseCoupling | Avoid using implementation types like 'ArrayList'; use the interface instead | 315 |
LooseCoupling | Avoid using implementation types like 'ArrayList'; use the interface instead | 315 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 317 |
Rule | Violation | Line |
---|---|---|
LooseCoupling | Avoid using implementation types like 'ArrayList'; use the interface instead | 168 |
LooseCoupling | Avoid using implementation types like 'ArrayList'; use the interface instead | 168 |
Rule | Violation | Line |
---|---|---|
UseLocaleWithCaseConversions | When doing a String.toLowerCase()/toUpperCase() call, use a Locale | 89 |
Rule | Violation | Line |
---|---|---|
TooManyMethods | This class has too many methods, consider refactoring it. | 46–421 |
MissingOverride | The method 'insert(Subscriber, Plugin)' is missing an @Override annotation. | 72–84 |
MissingOverride | The method 'delete(int, Plugin)' is missing an @Override annotation. | 94–100 |
MissingOverride | The method 'load(int, Plugin)' is missing an @Override annotation. | 111–128 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the checkPrimaryKey method if you want a default access modifier | 139–155 |
DefaultPackage | Use explicit scoping instead of the default package private level | 139–155 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the newPrimaryKey method if you want a default access modifier | 164–183 |
DefaultPackage | Use explicit scoping instead of the default package private level | 164–183 |
MissingOverride | The method 'selectAll(Plugin)' is missing an @Override annotation. | 192–211 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 197 |
MissingOverride | The method 'selectByEmail(String, Plugin)' is missing an @Override annotation. | 222–240 |
UseLocaleWithCaseConversions | When doing a String.toLowerCase()/toUpperCase() call, use a Locale | 225 |
MissingOverride | The method 'selectSubscribers(int, Plugin)' is missing an @Override annotation. | 251–272 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 257 |
MissingOverride | The method 'selectSubscribers(int, String, int, int, Plugin)' is missing an @Override annotation. | 289–316 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 300 |
MissingOverride | The method 'selectSubscribersForSending(int, String, int, int, Plugin)' is missing an @Override annotation. | 333–360 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 344 |
MissingOverride | The method 'selectNewsLetters(int, Plugin)' is missing an @Override annotation. | 371–392 |
MissingOverride | The method 'selectSubscribersList(Plugin)' is missing an @Override annotation. | 401–420 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 407 |
Rule | Violation | Line |
---|---|---|
LooseCoupling | Avoid using implementation types like 'ArrayList'; use the interface instead | 79 |
Rule | Violation | Line |
---|---|---|
MissingOverride | The method 'getXmlDocument(HttpServletRequest)' is missing an @Override annotation. | 68–71 |
MissingOverride | The method 'getXml(HttpServletRequest)' is missing an @Override annotation. | 80–101 |
MissingOverride | The method 'remove()' is missing an @Override annotation. | 114–117 |
Rule | Violation | Line |
---|---|---|
MissingOverride | The method 'insert(Portlet)' is missing an @Override annotation. | 65–68 |
MissingOverride | The method 'delete(int)' is missing an @Override annotation. | 77–83 |
MissingOverride | The method 'load(int)' is missing an @Override annotation. | 92–110 |
MissingOverride | The method 'store(Portlet)' is missing an @Override annotation. | 118–121 |
MissingOverride | The method 'insertSending(int, int, Plugin)' is missing an @Override annotation. | 131–139 |
MissingOverride | The method 'removeSending(int, int, Plugin)' is missing an @Override annotation. | 149–157 |
MissingOverride | The method 'findSendingsInPortlet(int, Plugin)' is missing an @Override annotation. | 166–182 |
LooseCoupling | Avoid using implementation types like 'ArrayList'; use the interface instead | 166 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 168 |
Rule | Violation | Line |
---|---|---|
AssignmentToNonFinalStatic | Possible unsafe assignment to a non-final static field in a constructor. | 50 |
CallSuperInConstructor | It is a good practice to call super() in a constructor | 58–64 |
MissingOverride | The method 'getPortletTypeId()' is missing an @Override annotation. | 71–77 |
UnnecessaryLocalBeforeReturn | Consider simply returning the value vs storing it in local variable 'strPortletTypeId' | 76 |
MissingOverride | The method 'getDAO()' is missing an @Override annotation. | 94–97 |
LooseCoupling | Avoid using implementation types like 'ArrayList'; use the interface instead | 132 |
Rule | Violation | Line |
---|---|---|
MissingOverride | The method 'compare(NewsLetter, NewsLetter)' is missing an @Override annotation. | 98–101 |
MissingOverride | The method 'setPluginName(String)' is missing an @Override annotation. | 114–120 |
MissingOverride | The method 'getXmlDocument(HttpServletRequest)' is missing an @Override annotation. | 129–132 |
ExcessiveMethodLength | Avoid really long methods. | 141–246 |
CyclomaticComplexity | The method 'getXml(HttpServletRequest)' has a cyclomatic complexity of 12. | 141–246 |
NPathComplexity | The method 'getXml(HttpServletRequest)' has an NPath complexity of 960 | 141–246 |
MissingOverride | The method 'getXml(HttpServletRequest)' is missing an @Override annotation. | 141–246 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 178 |
UnnecessaryLocalBeforeReturn | Consider simply returning the value vs storing it in local variable 'str' | 245 |
MissingOverride | The method 'remove()' is missing an @Override annotation. | 259–262 |
Rule | Violation | Line |
---|---|---|
MissingOverride | The method 'insert(Portlet)' is missing an @Override annotation. | 65–68 |
MissingOverride | The method 'delete(int)' is missing an @Override annotation. | 77–83 |
MissingOverride | The method 'load(int)' is missing an @Override annotation. | 92–110 |
MissingOverride | The method 'store(Portlet)' is missing an @Override annotation. | 118–121 |
MissingOverride | The method 'insertSubscription(int, int)' is missing an @Override annotation. | 131–139 |
MissingOverride | The method 'removeSubscription(int, int)' is missing an @Override annotation. | 149–157 |
MissingOverride | The method 'findSelectedNewsletters(int)' is missing an @Override annotation. | 166–182 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 168 |
Rule | Violation | Line |
---|---|---|
MissingOverride | The method 'getPortletTypeId()' is missing an @Override annotation. | 59–65 |
UnnecessaryLocalBeforeReturn | Consider simply returning the value vs storing it in local variable 'strPortletTypeId' | 64 |
MissingOverride | The method 'getDAO()' is missing an @Override annotation. | 82–85 |
Rule | Violation | Line |
---|---|---|
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 121 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 124 |
UseCollectionIsEmpty | Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 126 |
Rule | Violation | Line |
---|---|---|
ShortVariable | Avoid variables with short names like o | 192 |
CyclomaticComplexity | The method 'compareTo(NewsletterTopic)' has a cyclomatic complexity of 12. | 192–228 |
ShortVariable | Avoid variables with short names like o | 250 |
Rule | Violation | Line |
---|---|---|
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 139 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 178 |
Rule | Violation | Line |
---|---|---|
UseCollectionIsEmpty | Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 151 |
AvoidLiteralsInIfCondition | Avoid using Literals in Conditional Statements | 154 |
Rule | Violation | Line |
---|---|---|
AssignmentToNonFinalStatic | Possible unsafe assignment to a non-final static field in a constructor. | 64 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 98 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 100 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 117 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 117 |
Rule | Violation | Line |
---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 34–431 |
AssignmentToNonFinalStatic | Possible unsafe assignment to a non-final static field in a constructor. | 93 |
ExcessiveMethodLength | Avoid really long methods. | 129–233 |
CyclomaticComplexity | The method 'doSubscription(HttpServletRequest)' has a cyclomatic complexity of 13. | 129–233 |
NPathComplexity | The method 'doSubscription(HttpServletRequest)' has an NPath complexity of 579 | 129–233 |
CollapsibleIfStatements | These nested if statements could be combined | 153–157 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 209 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 209 |
CyclomaticComplexity | The method 'doConfirmSubscribe(HttpServletRequest)' has a cyclomatic complexity of 10. | 243–324 |
CyclomaticComplexity | The method 'doUnSubscribe(HttpServletRequest)' has a cyclomatic complexity of 10. | 334–377 |
InsufficientStringBufferDeclaration | StringBuffer constructor is initialized with size 16, but has at least 104 characters appended. | 406 |
ConsecutiveLiteralAppends | StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. | 407 |
Rule | Violation | Line |
---|---|---|
MissingOverride | The method 'init()' is missing an @Override annotation. | 53–58 |
Rule | Violation | Line |
---|---|---|
CallSuperInConstructor | It is a good practice to call super() in a constructor | 124–127 |
MissingOverride | The method 'register()' is missing an @Override annotation. | 132–196 |
ShortVariable | Avoid variables with short names like rt | 134 |
ShortVariable | Avoid variables with short names like p | 140 |
MissingOverride | The method 'getResourceIdList(Locale)' is missing an @Override annotation. | 205–208 |
MissingOverride | The method 'getTitle(String, Locale)' is missing an @Override annotation. | 219–229 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 228 |
Rule | Violation | Line |
---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 34–524 |
GodClass | Possible God Class (WMC=49, ATFD=62, TCC=0.000%) | 82–524 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 142–150 |
ShortVariable | Avoid variables with short names like t | 155 |
UseCollectionIsEmpty | Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 166 |
UnnecessaryWrapperObjectCreation | Unnecessary wrapper object creation | 205 |
IdenticalCatchBranches | 'catch' branch identical to 'UnsupportedEncodingException' branch | 241–244 |
CyclomaticComplexity | The method 'generateNewsletterHtmlCode(NewsLetter, int, String, AdminUser, Locale)' has a cyclomatic complexity of 11. | 300–363 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 310 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 310 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 318 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 347 |
Rule | Violation | Line |
---|---|---|
CallSuperInConstructor | It is a good practice to call super() in a constructor | 70–73 |
MissingOverride | The method 'register()' is missing an @Override annotation. | 78–102 |
ShortVariable | Avoid variables with short names like rt | 80 |
ShortVariable | Avoid variables with short names like p | 86 |
MissingOverride | The method 'getResourceIdList(Locale)' is missing an @Override annotation. | 111–114 |
MissingOverride | The method 'getTitle(String, Locale)' is missing an @Override annotation. | 125–136 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 135 |
Rule | Violation | Line |
---|---|---|
MissingOverride | The method 'run()' is missing an @Override annotation. | 46–49 |
Rule | Violation | Line |
---|---|---|
MissingOverride | The method 'hasConfiguration()' is missing an @Override annotation. | 103–106 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 115 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 115 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 193–200 |
Rule | Violation | Line |
---|---|---|
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 222 |
Rule | Violation | Line |
---|---|---|
ImmutableField | Private field '_strBaseUrl' could be made final; it is only initialized in the declaration or constructor. | 124 |
ShortVariable | Avoid variables with short names like tf | 208 |
IdenticalCatchBranches | 'catch' branch identical to 'TransformerConfigurationException' branch | 222–227 |
UnnecessaryLocalBeforeReturn | Consider simply returning the value vs storing it in local variable 'stringResult' | 231 |
ImmutableField | Private field '_strTagName' could be made final; it is only initialized in the declaration or constructor. | 259 |
ImmutableField | Private field '_strAttributeName' could be made final; it is only initialized in the declaration or constructor. | 260 |
ImmutableField | Private field '_strTestedAttributeName' could be made final; it is only initialized in the declaration or constructor. | 261 |
ImmutableField | Private field '_strTestedAttributeValue' could be made final; it is only initialized in the declaration or constructor. | 262 |
Rule | Violation | Line |
---|---|---|
FieldDeclarationsShouldBeAtStartOfClass | Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. | 161 |
FieldDeclarationsShouldBeAtStartOfClass | Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. | 162 |
Rule | Violation | Line |
---|---|---|
UseStringBufferForStringAppends | Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings | 85 |
UseStringBufferForStringAppends | Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings | 86 |
PositionLiteralsFirstInComparisons | Position literals first in String comparisons | 149 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 157–164 |
CommentRequired | Public method and constructor comments are required | 227–230 |
Rule | Violation | Line |
---|---|---|
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 65–277 |
UncommentedEmptyMethodBody | Document empty method body | 100–101 |
MissingOverride | The method 'getPage(HttpServletRequest, int, Plugin)' is missing an @Override annotation. | 116–151 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 121 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 166–197 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 178 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 266 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 266 |
Rule | Violation | Line |
---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 34–2596 |
ExcessivePublicCount | This class has a bunch of public methods and attributes | 34–2596 |
CyclomaticComplexity | The class 'NewsletterJspBean' has a total cyclomatic complexity of 227 (highest 19). | 115–2596 |
ExcessiveClassLength | Avoid really long classes. | 115–2596 |
TooManyMethods | This class has too many methods, consider refactoring it. | 116–2596 |
ImmutableField | Private field '_newsletterService' could be made final; it is only initialized in the declaration or constructor. | 336 |
ImmutableField | Private field '_newsletterTopicService' could be made final; it is only initialized in the declaration or constructor. | 337 |
CallSuperInConstructor | It is a good practice to call super() in a constructor | 342–345 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 360 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 360 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 364 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 368 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 368 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 403–404 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 433 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 433 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 439–440 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 471 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 471 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 511–518 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 520–527 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 553 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 553 |
CyclomaticComplexity | The method 'getComposeNewsLetter(HttpServletRequest)' has a cyclomatic complexity of 10. | 582–662 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 587 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 602 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 602 |
UseCollectionIsEmpty | Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 688 |
CyclomaticComplexity | The method 'doCreateNewsLetter(HttpServletRequest)' has a cyclomatic complexity of 15. | 730–805 |
NPathComplexity | The method 'doCreateNewsLetter(HttpServletRequest)' has an NPath complexity of 672 | 730–805 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 733 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 734 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 735 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 736 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 737 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 738 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 739 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 740 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 784–791 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 818 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 818 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 818 |
CyclomaticComplexity | The method 'doModifyNewsLetter(HttpServletRequest)' has a cyclomatic complexity of 12. | 855–931 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 858 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 859 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 860 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 861 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 862 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 863 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 864 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 868 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 1005 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 1111 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 1146–1155 |
ShortVariable | Avoid variables with short names like sb | 1157 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 1167 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 1225 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 1251 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 1284 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 1328–1329 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 1331 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 1331 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 1430 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 1430 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 1433–1440 |
UseStringBufferForStringAppends | Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings | 1509 |
NPathComplexity | The method 'doConfirmSendNewsLetter(HttpServletRequest)' has an NPath complexity of 324 | 1524–1581 |
CyclomaticComplexity | The method 'doConfirmSendNewsLetter(HttpServletRequest)' has a cyclomatic complexity of 11. | 1524–1581 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 1567 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 1677 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 1743 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 1744 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 1757–1790 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 1817 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 1817 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 1848 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 1848 |
ExcessiveMethodLength | Avoid really long methods. | 1864–1964 |
CyclomaticComplexity | The method 'doImportSubscribers(HttpServletRequest)' has a cyclomatic complexity of 19. | 1864–1964 |
NPathComplexity | The method 'doImportSubscribers(HttpServletRequest)' has an NPath complexity of 1410 | 1864–1964 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 1870 |
UseCollectionIsEmpty | Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 1908 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 1932–1951 |
PreserveStackTrace | New exception is thrown in catch block, original stack trace may be lost | 1962 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 1979 |
ShortVariable | Avoid variables with short names like os | 1994 |
ExcessiveMethodLength | Avoid really long methods. | 2018–2129 |
CyclomaticComplexity | The method 'getManageNewsletterTopics(HttpServletRequest)' has a cyclomatic complexity of 12. | 2018–2129 |
NcssCount | The method 'getManageNewsletterTopics(HttpServletRequest)' has a NCSS line count of 68. | 2018–2129 |
NPathComplexity | The method 'getManageNewsletterTopics(HttpServletRequest)' has an NPath complexity of 360 | 2018–2129 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 2063 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 2063 |
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 2085 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 2090–2091 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 2276 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 2276 |
LinguisticNaming | Linguistics Antipattern - The method 'isWrongEmail' indicates linguistically it returns a boolean, but it returns 'String' | 2385–2402 |
ForLoopCanBeForeach | This for loop can be replaced by a foreach loop | 2393–2399 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 2443 |
ForLoopCanBeForeach | This for loop can be replaced by a foreach loop | 2451–2459 |
UseTryWithResources | Consider using a try-with-resources statement instead of explicitly closing the resource | 2499–2526 |
LinguisticNaming | Linguistics Antipattern - The setter 'setHtmlTemplateEmail' should not return any type except void linguistically | 2542–2558 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 2544 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 2544 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 2569 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 2570 |
Rule | Violation | Line |
---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 34–811 |
GodClass | Possible God Class (WMC=84, ATFD=215, TCC=16.667%) | 91–811 |
CyclomaticComplexity | The class 'NewsletterTemplateJspBean' has a total cyclomatic complexity of 84 (highest 24). | 91–811 |
ImmutableField | Private field '_newsletterTopicService' could be made final; it is only initialized in the declaration or constructor. | 147 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 160 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 160 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 165 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 169 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 169 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 221 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 221 |
CyclomaticComplexity | The method 'doCreateNewsletterTemplate(HttpServletRequest)' has a cyclomatic complexity of 21. | 237–329 |
NPathComplexity | The method 'doCreateNewsletterTemplate(HttpServletRequest)' has an NPath complexity of 2116 | 237–329 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 296 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 323 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 354 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 354 |
NcssCount | The method 'doModifyNewsletterTemplate(HttpServletRequest)' has a NCSS line count of 65. | 371–500 |
ExcessiveMethodLength | Avoid really long methods. | 371–500 |
CyclomaticComplexity | The method 'doModifyNewsletterTemplate(HttpServletRequest)' has a cyclomatic complexity of 24. | 371–500 |
NPathComplexity | The method 'doModifyNewsletterTemplate(HttpServletRequest)' has an NPath complexity of 18818 | 371–500 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 397 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 406 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 409 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 494 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 513 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 513 |
UseTryWithResources | Consider using a try-with-resources statement instead of explicitly closing the resource | 516–563 |
IdenticalCatchBranches | 'catch' branch identical to 'FileNotFoundException' branch | 556–559 |
CyclomaticComplexity | The method 'doModifyNewsletterTemplateFile(HttpServletRequest)' has a cyclomatic complexity of 11. | 576–664 |
UseTryWithResources | Consider using a try-with-resources statement instead of explicitly closing the resource | 579–661 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 603 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 654 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 685 |
Rule | Violation | Line |
---|---|---|
MissingOverride | The method 'getCreate(HttpServletRequest)' is missing an @Override annotation. | 93–108 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 100 |
MissingOverride | The method 'doCreate(HttpServletRequest)' is missing an @Override annotation. | 117–150 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 119 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 123 |
MissingOverride | The method 'getModify(HttpServletRequest)' is missing an @Override annotation. | 159–185 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 169 |
MissingOverride | The method 'doModify(HttpServletRequest)' is missing an @Override annotation. | 194–227 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 199 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 250 |
Rule | Violation | Line |
---|---|---|
MissingOverride | The method 'getCreate(HttpServletRequest)' is missing an @Override annotation. | 102–118 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 110 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 111 |
MissingOverride | The method 'doCreate(HttpServletRequest)' is missing an @Override annotation. | 127–161 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 129 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 133 |
MissingOverride | The method 'getModify(HttpServletRequest)' is missing an @Override annotation. | 170–195 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 179 |
MissingOverride | The method 'doModify(HttpServletRequest)' is missing an @Override annotation. | 204–237 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 209 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 260 |
Rule | Violation | Line |
---|---|---|
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'java.sql.Timestamp' due to existing import 'java.sql.Timestamp' | 242 |
Rule | Violation | Line |
---|---|---|
ShortClassName | Avoid short class names like Pair | 46–81 |
Rule | Violation | Line |
---|---|---|
BooleanGetMethodName | A getX() method which returns a boolean should be named isX() | 118–121 |
Rule | Violation | Line |
---|---|---|
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.w3c.dom.Document' due to existing import 'org.w3c.dom.Document' | 239 |
Rule | Violation | Line |
---|---|---|
UseVarargs | Consider using varargs for methods or constructors which take an array the last parameter. | 182 |
UseVarargs | Consider using varargs for methods or constructors which take an array the last parameter. | 197 |
Rule | Violation | Line |
---|---|---|
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'java.sql.Timestamp' due to existing import 'java.sql.Timestamp' | 1396 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'java.sql.Timestamp' due to existing import 'java.sql.Timestamp' | 1914 |
Rule | Violation | Priority | Line |
---|---|---|---|
MissingOverride | The method 'delete(int, int, Plugin)' is missing an @Override annotation. | 3 | 59–68 |
MissingOverride | The method 'exists(int, int, Plugin)' is missing an @Override annotation. | 3 | 81–94 |
MissingOverride | The method 'insert(int, int, Plugin)' is missing an @Override annotation. | 3 | 106–115 |
Rule | Violation | Priority | Line |
---|---|---|---|
TooManyMethods | This class has too many methods, consider refactoring it. | 3 | 50–265 |
Rule | Violation | Priority | Line |
---|---|---|---|
LooseCoupling | Avoid using implementation types like 'ArrayList'; use the interface instead | 3 | 117 |
LooseCoupling | Avoid using implementation types like 'ArrayList'; use the interface instead | 3 | 117 |
Rule | Violation | Priority | Line |
---|---|---|---|
TooManyFields | Too many fields | 3 | 46–445 |
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 3 | 77–86 |
MissingOverride | The method 'getWorkgroup()' is missing an @Override annotation. | 3 | 326–329 |
MissingOverride | The method 'getResourceId()' is missing an @Override annotation. | 3 | 410–413 |
AddEmptyString | Do not add empty strings | 3 | 412 |
MissingOverride | The method 'getResourceTypeCode()' is missing an @Override annotation. | 3 | 420–423 |
Rule | Violation | Priority | Line |
---|---|---|---|
TooManyMethods | This class has too many methods, consider refactoring it. | 3 | 50–527 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 258 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 315 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 468–476 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 498–506 |
Rule | Violation | Priority | Line |
---|---|---|---|
TooManyMethods | This class has too many methods, consider refactoring it. | 3 | 49–316 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'java.sql.Timestamp' due to existing import 'java.sql.Timestamp' | 4 | 242 |
Rule | Violation | Priority | Line |
---|---|---|---|
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 3 | 62–69 |
MissingOverride | The method 'getWorkgroup()' is missing an @Override annotation. | 3 | 181–184 |
MissingOverride | The method 'getResourceId()' is missing an @Override annotation. | 3 | 202–205 |
MissingOverride | The method 'getResourceTypeCode()' is missing an @Override annotation. | 3 | 212–215 |
Rule | Violation | Priority | Line |
---|---|---|---|
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 73 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 134 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 274 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 311–319 |
Rule | Violation | Priority | Line |
---|---|---|---|
MissingOverride | The method 'load(Plugin)' is missing an @Override annotation. | 3 | 57–83 |
MissingOverride | The method 'store(NewsLetterProperties, Plugin)' is missing an @Override annotation. | 3 | 93–102 |
Rule | Violation | Priority | Line |
---|---|---|---|
ShortVariable | Avoid variables with short names like id | 3 | 63 |
Rule | Violation | Priority | Line |
---|---|---|---|
MissingOverride | The method 'canBeRemoved(String)' is missing an @Override annotation. | 3 | 58–76 |
MissingOverride | The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. | 3 | 87–91 |
Rule | Violation | Priority | Line |
---|---|---|---|
MissingOverride | The method 'canBeRemoved(String)' is missing an @Override annotation. | 3 | 58–76 |
MissingOverride | The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. | 3 | 87–91 |
Rule | Violation | Priority | Line |
---|---|---|---|
ShortClassName | Avoid short class names like Pair | 4 | 46–81 |
ImmutableField | Private field '_first' could be made final; it is only initialized in the declaration or constructor. | 3 | 48 |
ImmutableField | Private field '_second' could be made final; it is only initialized in the declaration or constructor. | 3 | 49 |
Rule | Violation | Priority | Line |
---|---|---|---|
MissingOverride | The method 'insert(SendingNewsLetter, Plugin)' is missing an @Override annotation. | 3 | 68–83 |
MissingOverride | The method 'delete(int, Plugin)' is missing an @Override annotation. | 3 | 93–99 |
MissingOverride | The method 'load(int, Plugin)' is missing an @Override annotation. | 3 | 110–133 |
MissingOverride | The method 'store(SendingNewsLetter, Plugin)' is missing an @Override annotation. | 3 | 143–150 |
DefaultPackage | Use explicit scoping instead of the default package private level | 3 | 161–177 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the checkPrimaryKey method if you want a default access modifier | 3 | 161–177 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the newPrimaryKey method if you want a default access modifier | 3 | 186–204 |
DefaultPackage | Use explicit scoping instead of the default package private level | 3 | 186–204 |
MissingOverride | The method 'selectLastSendingForNewsletterId(int, Plugin)' is missing an @Override annotation. | 3 | 215–237 |
MissingOverride | The method 'selectAllLastSendingForNewsletterId(int, Plugin)' is missing an @Override annotation. | 3 | 248–272 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 251 |
MissingOverride | The method 'findAllSendings(Plugin)' is missing an @Override annotation. | 3 | 281–304 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 283 |
MissingOverride | The method 'findSendingsByIds(ArrayList, Plugin)' is missing an @Override annotation. | 3 | 315–340 |
LooseCoupling | Avoid using implementation types like 'ArrayList'; use the interface instead | 3 | 315 |
LooseCoupling | Avoid using implementation types like 'ArrayList'; use the interface instead | 3 | 315 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 317 |
Rule | Violation | Priority | Line |
---|---|---|---|
LooseCoupling | Avoid using implementation types like 'ArrayList'; use the interface instead | 3 | 168 |
LooseCoupling | Avoid using implementation types like 'ArrayList'; use the interface instead | 3 | 168 |
Rule | Violation | Priority | Line |
---|---|---|---|
UseLocaleWithCaseConversions | When doing a String.toLowerCase()/toUpperCase() call, use a Locale | 3 | 89 |
BooleanGetMethodName | A getX() method which returns a boolean should be named isX() | 4 | 118–121 |
Rule | Violation | Priority | Line |
---|---|---|---|
TooManyMethods | This class has too many methods, consider refactoring it. | 3 | 46–421 |
MissingOverride | The method 'insert(Subscriber, Plugin)' is missing an @Override annotation. | 3 | 72–84 |
MissingOverride | The method 'delete(int, Plugin)' is missing an @Override annotation. | 3 | 94–100 |
MissingOverride | The method 'load(int, Plugin)' is missing an @Override annotation. | 3 | 111–128 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the checkPrimaryKey method if you want a default access modifier | 3 | 139–155 |
DefaultPackage | Use explicit scoping instead of the default package private level | 3 | 139–155 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the newPrimaryKey method if you want a default access modifier | 3 | 164–183 |
DefaultPackage | Use explicit scoping instead of the default package private level | 3 | 164–183 |
MissingOverride | The method 'selectAll(Plugin)' is missing an @Override annotation. | 3 | 192–211 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 197 |
MissingOverride | The method 'selectByEmail(String, Plugin)' is missing an @Override annotation. | 3 | 222–240 |
UseLocaleWithCaseConversions | When doing a String.toLowerCase()/toUpperCase() call, use a Locale | 3 | 225 |
MissingOverride | The method 'selectSubscribers(int, Plugin)' is missing an @Override annotation. | 3 | 251–272 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 257 |
MissingOverride | The method 'selectSubscribers(int, String, int, int, Plugin)' is missing an @Override annotation. | 3 | 289–316 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 300 |
MissingOverride | The method 'selectSubscribersForSending(int, String, int, int, Plugin)' is missing an @Override annotation. | 3 | 333–360 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 344 |
MissingOverride | The method 'selectNewsLetters(int, Plugin)' is missing an @Override annotation. | 3 | 371–392 |
MissingOverride | The method 'selectSubscribersList(Plugin)' is missing an @Override annotation. | 3 | 401–420 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 407 |
Rule | Violation | Priority | Line |
---|---|---|---|
LooseCoupling | Avoid using implementation types like 'ArrayList'; use the interface instead | 3 | 79 |
Rule | Violation | Priority | Line |
---|---|---|---|
MissingOverride | The method 'getXmlDocument(HttpServletRequest)' is missing an @Override annotation. | 3 | 68–71 |
MissingOverride | The method 'getXml(HttpServletRequest)' is missing an @Override annotation. | 3 | 80–101 |
MissingOverride | The method 'remove()' is missing an @Override annotation. | 3 | 114–117 |
Rule | Violation | Priority | Line |
---|---|---|---|
MissingOverride | The method 'insert(Portlet)' is missing an @Override annotation. | 3 | 65–68 |
MissingOverride | The method 'delete(int)' is missing an @Override annotation. | 3 | 77–83 |
MissingOverride | The method 'load(int)' is missing an @Override annotation. | 3 | 92–110 |
MissingOverride | The method 'store(Portlet)' is missing an @Override annotation. | 3 | 118–121 |
MissingOverride | The method 'insertSending(int, int, Plugin)' is missing an @Override annotation. | 3 | 131–139 |
MissingOverride | The method 'removeSending(int, int, Plugin)' is missing an @Override annotation. | 3 | 149–157 |
MissingOverride | The method 'findSendingsInPortlet(int, Plugin)' is missing an @Override annotation. | 3 | 166–182 |
LooseCoupling | Avoid using implementation types like 'ArrayList'; use the interface instead | 3 | 166 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 168 |
Rule | Violation | Priority | Line |
---|---|---|---|
AssignmentToNonFinalStatic | Possible unsafe assignment to a non-final static field in a constructor. | 3 | 50 |
CallSuperInConstructor | It is a good practice to call super() in a constructor | 3 | 58–64 |
MissingOverride | The method 'getPortletTypeId()' is missing an @Override annotation. | 3 | 71–77 |
UnnecessaryLocalBeforeReturn | Consider simply returning the value vs storing it in local variable 'strPortletTypeId' | 3 | 76 |
MissingOverride | The method 'getDAO()' is missing an @Override annotation. | 3 | 94–97 |
LooseCoupling | Avoid using implementation types like 'ArrayList'; use the interface instead | 3 | 132 |
Rule | Violation | Priority | Line |
---|---|---|---|
MissingOverride | The method 'compare(NewsLetter, NewsLetter)' is missing an @Override annotation. | 3 | 98–101 |
MissingOverride | The method 'setPluginName(String)' is missing an @Override annotation. | 3 | 114–120 |
MissingOverride | The method 'getXmlDocument(HttpServletRequest)' is missing an @Override annotation. | 3 | 129–132 |
ExcessiveMethodLength | Avoid really long methods. | 3 | 141–246 |
CyclomaticComplexity | The method 'getXml(HttpServletRequest)' has a cyclomatic complexity of 12. | 3 | 141–246 |
NPathComplexity | The method 'getXml(HttpServletRequest)' has an NPath complexity of 960 | 3 | 141–246 |
MissingOverride | The method 'getXml(HttpServletRequest)' is missing an @Override annotation. | 3 | 141–246 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 178 |
UnnecessaryLocalBeforeReturn | Consider simply returning the value vs storing it in local variable 'str' | 3 | 245 |
MissingOverride | The method 'remove()' is missing an @Override annotation. | 3 | 259–262 |
Rule | Violation | Priority | Line |
---|---|---|---|
MissingOverride | The method 'insert(Portlet)' is missing an @Override annotation. | 3 | 65–68 |
MissingOverride | The method 'delete(int)' is missing an @Override annotation. | 3 | 77–83 |
MissingOverride | The method 'load(int)' is missing an @Override annotation. | 3 | 92–110 |
MissingOverride | The method 'store(Portlet)' is missing an @Override annotation. | 3 | 118–121 |
MissingOverride | The method 'insertSubscription(int, int)' is missing an @Override annotation. | 3 | 131–139 |
MissingOverride | The method 'removeSubscription(int, int)' is missing an @Override annotation. | 3 | 149–157 |
MissingOverride | The method 'findSelectedNewsletters(int)' is missing an @Override annotation. | 3 | 166–182 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 168 |
Rule | Violation | Priority | Line |
---|---|---|---|
MissingOverride | The method 'getPortletTypeId()' is missing an @Override annotation. | 3 | 59–65 |
UnnecessaryLocalBeforeReturn | Consider simply returning the value vs storing it in local variable 'strPortletTypeId' | 3 | 64 |
MissingOverride | The method 'getDAO()' is missing an @Override annotation. | 3 | 82–85 |
Rule | Violation | Priority | Line |
---|---|---|---|
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 121 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 124 |
UseCollectionIsEmpty | Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 3 | 126 |
Rule | Violation | Priority | Line |
---|---|---|---|
ShortVariable | Avoid variables with short names like o | 3 | 192 |
CyclomaticComplexity | The method 'compareTo(NewsletterTopic)' has a cyclomatic complexity of 12. | 3 | 192–228 |
ShortVariable | Avoid variables with short names like o | 3 | 250 |
Rule | Violation | Priority | Line |
---|---|---|---|
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 139 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 178 |
Rule | Violation | Priority | Line |
---|---|---|---|
UseCollectionIsEmpty | Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 3 | 151 |
AvoidLiteralsInIfCondition | Avoid using Literals in Conditional Statements | 3 | 154 |
Rule | Violation | Priority | Line |
---|---|---|---|
AssignmentToNonFinalStatic | Possible unsafe assignment to a non-final static field in a constructor. | 3 | 64 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 98 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 100 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 117 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 117 |
Rule | Violation | Priority | Line |
---|---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 3 | 34–431 |
AssignmentToNonFinalStatic | Possible unsafe assignment to a non-final static field in a constructor. | 3 | 93 |
ExcessiveMethodLength | Avoid really long methods. | 3 | 129–233 |
CyclomaticComplexity | The method 'doSubscription(HttpServletRequest)' has a cyclomatic complexity of 13. | 3 | 129–233 |
NPathComplexity | The method 'doSubscription(HttpServletRequest)' has an NPath complexity of 579 | 3 | 129–233 |
CollapsibleIfStatements | These nested if statements could be combined | 3 | 153–157 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 209 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 209 |
CyclomaticComplexity | The method 'doConfirmSubscribe(HttpServletRequest)' has a cyclomatic complexity of 10. | 3 | 243–324 |
CyclomaticComplexity | The method 'doUnSubscribe(HttpServletRequest)' has a cyclomatic complexity of 10. | 3 | 334–377 |
InsufficientStringBufferDeclaration | StringBuffer constructor is initialized with size 16, but has at least 104 characters appended. | 3 | 406 |
ConsecutiveLiteralAppends | StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. | 3 | 407 |
Rule | Violation | Priority | Line |
---|---|---|---|
MissingOverride | The method 'init()' is missing an @Override annotation. | 3 | 53–58 |
Rule | Violation | Priority | Line |
---|---|---|---|
CallSuperInConstructor | It is a good practice to call super() in a constructor | 3 | 124–127 |
MissingOverride | The method 'register()' is missing an @Override annotation. | 3 | 132–196 |
ShortVariable | Avoid variables with short names like rt | 3 | 134 |
ShortVariable | Avoid variables with short names like p | 3 | 140 |
MissingOverride | The method 'getResourceIdList(Locale)' is missing an @Override annotation. | 3 | 205–208 |
MissingOverride | The method 'getTitle(String, Locale)' is missing an @Override annotation. | 3 | 219–229 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 228 |
Rule | Violation | Priority | Line |
---|---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 3 | 34–524 |
GodClass | Possible God Class (WMC=49, ATFD=62, TCC=0.000%) | 3 | 82–524 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 142–150 |
ShortVariable | Avoid variables with short names like t | 3 | 155 |
UseCollectionIsEmpty | Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 3 | 166 |
UnnecessaryWrapperObjectCreation | Unnecessary wrapper object creation | 3 | 205 |
IdenticalCatchBranches | 'catch' branch identical to 'UnsupportedEncodingException' branch | 3 | 241–244 |
CyclomaticComplexity | The method 'generateNewsletterHtmlCode(NewsLetter, int, String, AdminUser, Locale)' has a cyclomatic complexity of 11. | 3 | 300–363 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 310 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 310 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 318 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 347 |
Rule | Violation | Priority | Line |
---|---|---|---|
CallSuperInConstructor | It is a good practice to call super() in a constructor | 3 | 70–73 |
MissingOverride | The method 'register()' is missing an @Override annotation. | 3 | 78–102 |
ShortVariable | Avoid variables with short names like rt | 3 | 80 |
ShortVariable | Avoid variables with short names like p | 3 | 86 |
MissingOverride | The method 'getResourceIdList(Locale)' is missing an @Override annotation. | 3 | 111–114 |
MissingOverride | The method 'getTitle(String, Locale)' is missing an @Override annotation. | 3 | 125–136 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 135 |
Rule | Violation | Priority | Line |
---|---|---|---|
MissingOverride | The method 'run()' is missing an @Override annotation. | 3 | 46–49 |
Rule | Violation | Priority | Line |
---|---|---|---|
MissingOverride | The method 'hasConfiguration()' is missing an @Override annotation. | 3 | 103–106 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 115 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 115 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 193–200 |
Rule | Violation | Priority | Line |
---|---|---|---|
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 222 |
Rule | Violation | Priority | Line |
---|---|---|---|
ImmutableField | Private field '_strBaseUrl' could be made final; it is only initialized in the declaration or constructor. | 3 | 124 |
ShortVariable | Avoid variables with short names like tf | 3 | 208 |
IdenticalCatchBranches | 'catch' branch identical to 'TransformerConfigurationException' branch | 3 | 222–227 |
UnnecessaryLocalBeforeReturn | Consider simply returning the value vs storing it in local variable 'stringResult' | 3 | 231 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.w3c.dom.Document' due to existing import 'org.w3c.dom.Document' | 4 | 239 |
ImmutableField | Private field '_strTagName' could be made final; it is only initialized in the declaration or constructor. | 3 | 259 |
ImmutableField | Private field '_strAttributeName' could be made final; it is only initialized in the declaration or constructor. | 3 | 260 |
ImmutableField | Private field '_strTestedAttributeName' could be made final; it is only initialized in the declaration or constructor. | 3 | 261 |
ImmutableField | Private field '_strTestedAttributeValue' could be made final; it is only initialized in the declaration or constructor. | 3 | 262 |
Rule | Violation | Priority | Line |
---|---|---|---|
ClassNamingConventions | The utility class name 'NewsLetterConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 1 | 41–163 |
FieldDeclarationsShouldBeAtStartOfClass | Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. | 3 | 161 |
FieldDeclarationsShouldBeAtStartOfClass | Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. | 3 | 162 |
Rule | Violation | Priority | Line |
---|---|---|---|
UseStringBufferForStringAppends | Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings | 3 | 85 |
UseStringBufferForStringAppends | Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings | 3 | 86 |
PositionLiteralsFirstInComparisons | Position literals first in String comparisons | 3 | 149 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 157–164 |
UseVarargs | Consider using varargs for methods or constructors which take an array the last parameter. | 4 | 182 |
UseVarargs | Consider using varargs for methods or constructors which take an array the last parameter. | 4 | 197 |
CommentRequired | Public method and constructor comments are required | 3 | 227–230 |
Rule | Violation | Priority | Line |
---|---|---|---|
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 3 | 65–277 |
UncommentedEmptyMethodBody | Document empty method body | 3 | 100–101 |
MissingOverride | The method 'getPage(HttpServletRequest, int, Plugin)' is missing an @Override annotation. | 3 | 116–151 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 121 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 166–197 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 178 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 266 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 266 |
Rule | Violation | Priority | Line |
---|---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 3 | 34–2596 |
ExcessivePublicCount | This class has a bunch of public methods and attributes | 3 | 34–2596 |
CyclomaticComplexity | The class 'NewsletterJspBean' has a total cyclomatic complexity of 227 (highest 19). | 3 | 115–2596 |
ExcessiveClassLength | Avoid really long classes. | 3 | 115–2596 |
TooManyMethods | This class has too many methods, consider refactoring it. | 3 | 116–2596 |
ImmutableField | Private field '_newsletterService' could be made final; it is only initialized in the declaration or constructor. | 3 | 336 |
ImmutableField | Private field '_newsletterTopicService' could be made final; it is only initialized in the declaration or constructor. | 3 | 337 |
CallSuperInConstructor | It is a good practice to call super() in a constructor | 3 | 342–345 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 360 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 360 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 364 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 368 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 368 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 403–404 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 433 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 433 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 439–440 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 471 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 471 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 511–518 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 520–527 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 553 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 553 |
CyclomaticComplexity | The method 'getComposeNewsLetter(HttpServletRequest)' has a cyclomatic complexity of 10. | 3 | 582–662 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 587 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 602 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 602 |
UseCollectionIsEmpty | Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 3 | 688 |
CyclomaticComplexity | The method 'doCreateNewsLetter(HttpServletRequest)' has a cyclomatic complexity of 15. | 3 | 730–805 |
NPathComplexity | The method 'doCreateNewsLetter(HttpServletRequest)' has an NPath complexity of 672 | 3 | 730–805 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 733 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 734 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 735 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 736 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 737 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 738 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 739 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 740 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 784–791 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 818 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 818 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 818 |
CyclomaticComplexity | The method 'doModifyNewsLetter(HttpServletRequest)' has a cyclomatic complexity of 12. | 3 | 855–931 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 858 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 859 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 860 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 861 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 862 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 863 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 864 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 868 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 1005 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 1111 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 1146–1155 |
ShortVariable | Avoid variables with short names like sb | 3 | 1157 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 3 | 1167 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 1225 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 1251 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 1284 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 1328–1329 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 1331 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 1331 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'java.sql.Timestamp' due to existing import 'java.sql.Timestamp' | 4 | 1396 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 1430 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 1430 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 1433–1440 |
UseStringBufferForStringAppends | Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings | 3 | 1509 |
NPathComplexity | The method 'doConfirmSendNewsLetter(HttpServletRequest)' has an NPath complexity of 324 | 3 | 1524–1581 |
CyclomaticComplexity | The method 'doConfirmSendNewsLetter(HttpServletRequest)' has a cyclomatic complexity of 11. | 3 | 1524–1581 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 1567 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 1677 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 1743 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 1744 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 1757–1790 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 1817 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 1817 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 1848 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 1848 |
ExcessiveMethodLength | Avoid really long methods. | 3 | 1864–1964 |
CyclomaticComplexity | The method 'doImportSubscribers(HttpServletRequest)' has a cyclomatic complexity of 19. | 3 | 1864–1964 |
NPathComplexity | The method 'doImportSubscribers(HttpServletRequest)' has an NPath complexity of 1410 | 3 | 1864–1964 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 1870 |
UseCollectionIsEmpty | Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 3 | 1908 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'java.sql.Timestamp' due to existing import 'java.sql.Timestamp' | 4 | 1914 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 1932–1951 |
PreserveStackTrace | New exception is thrown in catch block, original stack trace may be lost | 3 | 1962 |
AvoidThrowingRawExceptionTypes | Avoid throwing raw exception types. | 1 | 1962 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 1979 |
ShortVariable | Avoid variables with short names like os | 3 | 1994 |
ExcessiveMethodLength | Avoid really long methods. | 3 | 2018–2129 |
CyclomaticComplexity | The method 'getManageNewsletterTopics(HttpServletRequest)' has a cyclomatic complexity of 12. | 3 | 2018–2129 |
NcssCount | The method 'getManageNewsletterTopics(HttpServletRequest)' has a NCSS line count of 68. | 3 | 2018–2129 |
NPathComplexity | The method 'getManageNewsletterTopics(HttpServletRequest)' has an NPath complexity of 360 | 3 | 2018–2129 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 2063 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 2063 |
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 3 | 2085 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 2090–2091 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 2276 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 2276 |
LinguisticNaming | Linguistics Antipattern - The method 'isWrongEmail' indicates linguistically it returns a boolean, but it returns 'String' | 3 | 2385–2402 |
ForLoopCanBeForeach | This for loop can be replaced by a foreach loop | 3 | 2393–2399 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 2443 |
ForLoopCanBeForeach | This for loop can be replaced by a foreach loop | 3 | 2451–2459 |
UseTryWithResources | Consider using a try-with-resources statement instead of explicitly closing the resource | 3 | 2499–2526 |
AvoidFileStream | Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter | 1 | 2501 |
LinguisticNaming | Linguistics Antipattern - The setter 'setHtmlTemplateEmail' should not return any type except void linguistically | 3 | 2542–2558 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 2544 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 2544 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 2569 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 2570 |
Rule | Violation | Priority | Line |
---|---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 3 | 34–811 |
GodClass | Possible God Class (WMC=84, ATFD=215, TCC=16.667%) | 3 | 91–811 |
CyclomaticComplexity | The class 'NewsletterTemplateJspBean' has a total cyclomatic complexity of 84 (highest 24). | 3 | 91–811 |
ImmutableField | Private field '_newsletterTopicService' could be made final; it is only initialized in the declaration or constructor. | 3 | 147 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 160 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 160 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 165 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 169 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 169 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 221 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 221 |
CyclomaticComplexity | The method 'doCreateNewsletterTemplate(HttpServletRequest)' has a cyclomatic complexity of 21. | 3 | 237–329 |
NPathComplexity | The method 'doCreateNewsletterTemplate(HttpServletRequest)' has an NPath complexity of 2116 | 3 | 237–329 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 296 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 323 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 354 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 354 |
NcssCount | The method 'doModifyNewsletterTemplate(HttpServletRequest)' has a NCSS line count of 65. | 3 | 371–500 |
ExcessiveMethodLength | Avoid really long methods. | 3 | 371–500 |
CyclomaticComplexity | The method 'doModifyNewsletterTemplate(HttpServletRequest)' has a cyclomatic complexity of 24. | 3 | 371–500 |
NPathComplexity | The method 'doModifyNewsletterTemplate(HttpServletRequest)' has an NPath complexity of 18818 | 3 | 371–500 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 397 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 406 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 409 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 494 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 513 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 513 |
UseTryWithResources | Consider using a try-with-resources statement instead of explicitly closing the resource | 3 | 516–563 |
AvoidFileStream | Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter | 1 | 533 |
IdenticalCatchBranches | 'catch' branch identical to 'FileNotFoundException' branch | 3 | 556–559 |
CyclomaticComplexity | The method 'doModifyNewsletterTemplateFile(HttpServletRequest)' has a cyclomatic complexity of 11. | 3 | 576–664 |
UseTryWithResources | Consider using a try-with-resources statement instead of explicitly closing the resource | 3 | 579–661 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 603 |
AvoidFileStream | Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter | 1 | 633 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 654 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 685 |
Rule | Violation | Priority | Line |
---|---|---|---|
MissingOverride | The method 'getCreate(HttpServletRequest)' is missing an @Override annotation. | 3 | 93–108 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 100 |
MissingOverride | The method 'doCreate(HttpServletRequest)' is missing an @Override annotation. | 3 | 117–150 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 119 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 123 |
MissingOverride | The method 'getModify(HttpServletRequest)' is missing an @Override annotation. | 3 | 159–185 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 169 |
MissingOverride | The method 'doModify(HttpServletRequest)' is missing an @Override annotation. | 3 | 194–227 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 199 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 250 |
IntegerInstantiation | Avoid instantiating Integer objects. Call Integer.valueOf() instead. | 2 | 267 |
Rule | Violation | Priority | Line |
---|---|---|---|
MissingOverride | The method 'getCreate(HttpServletRequest)' is missing an @Override annotation. | 3 | 102–118 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 110 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 111 |
MissingOverride | The method 'doCreate(HttpServletRequest)' is missing an @Override annotation. | 3 | 127–161 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 129 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 133 |
MissingOverride | The method 'getModify(HttpServletRequest)' is missing an @Override annotation. | 3 | 170–195 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 179 |
MissingOverride | The method 'doModify(HttpServletRequest)' is missing an @Override annotation. | 3 | 204–237 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 209 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 260 |
IntegerInstantiation | Avoid instantiating Integer objects. Call Integer.valueOf() instead. | 2 | 277 |