Fork me on GitHub

Résultats PMD

Le document suivant contient les résultats de PMD 6.13.0.

Violations By Priority

Priority 1

fr/paris/lutece/plugins/newsletter/business/NewsLetterTemplate.java

Rule Violation Ligne
FieldNamingConventions The field name 'strFileKey' doesn't match '_[a-z][a-zA-Z0-9]*' 54

fr/paris/lutece/plugins/newsletter/service/NewsletterService.java

Rule Violation Ligne
LocalVariableNamingConventions The local variable name '_bTemplate' doesn't match '[a-z][a-zA-Z0-9]*' 367

fr/paris/lutece/plugins/newsletter/util/NewsLetterConstants.java

Rule Violation Ligne
ClassNamingConventions The utility class name 'NewsLetterConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 41168
FieldNamingConventions The public constant name 'PROPERTY_FileProviderStore' doesn't match '[A-Z][A-Z_0-9]*' 47

fr/paris/lutece/plugins/newsletter/web/NewsletterJspBean.java

Rule Violation Ligne
AvoidThrowingRawExceptionTypes Avoid throwing raw exception types. 1962
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 2515

fr/paris/lutece/plugins/newsletter/web/NewsletterTemplateJspBean.java

Rule Violation Ligne
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 534
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 537
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 547

Priority 2

fr/paris/lutece/plugins/newsletter/web/portlet/NewsLetterArchivePortletJspBean.java

Rule Violation Ligne
IntegerInstantiation Avoid instantiating Integer objects. Call Integer.valueOf() instead. 267

fr/paris/lutece/plugins/newsletter/web/portlet/NewsLetterSubscriptionPortletJspBean.java

Rule Violation Ligne
IntegerInstantiation Avoid instantiating Integer objects. Call Integer.valueOf() instead. 277

Priority 3

fr/paris/lutece/plugins/newsletter/business/AwaitingActivationDAO.java

Rule Violation Ligne
MissingOverride The method 'delete(int, int, Plugin)' is missing an @Override annotation. 5968
MissingOverride The method 'exists(int, int, Plugin)' is missing an @Override annotation. 8194
MissingOverride The method 'insert(int, int, Plugin)' is missing an @Override annotation. 106115

fr/paris/lutece/plugins/newsletter/business/INewsLetterDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 50265

fr/paris/lutece/plugins/newsletter/business/ISendingNewsLetterDAO.java

Rule Violation Ligne
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 117
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 117

fr/paris/lutece/plugins/newsletter/business/NewsLetter.java

Rule Violation Ligne
TooManyFields Too many fields 46445
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 7786
MissingOverride The method 'getWorkgroup()' is missing an @Override annotation. 326329
MissingOverride The method 'getResourceId()' is missing an @Override annotation. 410413
AddEmptyString Do not add empty strings 412
MissingOverride The method 'getResourceTypeCode()' is missing an @Override annotation. 420423

fr/paris/lutece/plugins/newsletter/business/NewsLetterDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 50527
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 ..; 468476
ConfusingTernary Avoid if (x != y) ..; else ..; 498506

fr/paris/lutece/plugins/newsletter/business/NewsLetterHome.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 49316

fr/paris/lutece/plugins/newsletter/business/NewsLetterTemplate.java

Rule Violation Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 6269
MissingOverride The method 'getWorkgroup()' is missing an @Override annotation. 181184
MissingOverride The method 'getResourceId()' is missing an @Override annotation. 202205
MissingOverride The method 'getResourceTypeCode()' is missing an @Override annotation. 212215

fr/paris/lutece/plugins/newsletter/business/NewsLetterTemplateDAO.java

Rule Violation Ligne
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 ..; 311319

fr/paris/lutece/plugins/newsletter/business/NewsletterPropertiesDAO.java

Rule Violation Ligne
MissingOverride The method 'load(Plugin)' is missing an @Override annotation. 5783
MissingOverride The method 'store(NewsLetterProperties, Plugin)' is missing an @Override annotation. 93102

fr/paris/lutece/plugins/newsletter/business/NewsletterTemplateRemovalListener.java

Rule Violation Ligne
ShortVariable Avoid variables with short names like id 63

fr/paris/lutece/plugins/newsletter/business/NewsletterTemplateWorkgroupRemovalListener.java

Rule Violation Ligne
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 5876
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 8791

fr/paris/lutece/plugins/newsletter/business/NewsletterWorkgroupRemovalListener.java

Rule Violation Ligne
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 5876
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 8791

fr/paris/lutece/plugins/newsletter/business/Pair.java

Rule Violation Ligne
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

fr/paris/lutece/plugins/newsletter/business/SendingNewsLetterDAO.java

Rule Violation Ligne
MissingOverride The method 'insert(SendingNewsLetter, Plugin)' is missing an @Override annotation. 6883
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 9399
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 110133
MissingOverride The method 'store(SendingNewsLetter, Plugin)' is missing an @Override annotation. 143150
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the checkPrimaryKey method if you want a default access modifier 161177
DefaultPackage Use explicit scoping instead of the default package private level 161177
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the newPrimaryKey method if you want a default access modifier 186204
DefaultPackage Use explicit scoping instead of the default package private level 186204
MissingOverride The method 'selectLastSendingForNewsletterId(int, Plugin)' is missing an @Override annotation. 215237
MissingOverride The method 'selectAllLastSendingForNewsletterId(int, Plugin)' is missing an @Override annotation. 248272
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 251
MissingOverride The method 'findAllSendings(Plugin)' is missing an @Override annotation. 281304
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 283
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 315
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 315
MissingOverride The method 'findSendingsByIds(ArrayList, Plugin)' is missing an @Override annotation. 315340
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 317

fr/paris/lutece/plugins/newsletter/business/SendingNewsLetterHome.java

Rule Violation Ligne
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 168
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 168

fr/paris/lutece/plugins/newsletter/business/Subscriber.java

Rule Violation Ligne
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 89

fr/paris/lutece/plugins/newsletter/business/SubscriberDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 46421
MissingOverride The method 'insert(Subscriber, Plugin)' is missing an @Override annotation. 7284
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 94100
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 111128
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the checkPrimaryKey method if you want a default access modifier 139155
DefaultPackage Use explicit scoping instead of the default package private level 139155
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the newPrimaryKey method if you want a default access modifier 164183
DefaultPackage Use explicit scoping instead of the default package private level 164183
MissingOverride The method 'selectAll(Plugin)' is missing an @Override annotation. 192211
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 197
MissingOverride The method 'selectByEmail(String, Plugin)' is missing an @Override annotation. 222240
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 225
MissingOverride The method 'selectSubscribers(int, Plugin)' is missing an @Override annotation. 251272
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. 289316
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. 333360
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 344
MissingOverride The method 'selectNewsLetters(int, Plugin)' is missing an @Override annotation. 371392
MissingOverride The method 'selectSubscribersList(Plugin)' is missing an @Override annotation. 401420
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 407

fr/paris/lutece/plugins/newsletter/business/portlet/INewsLetterArchivePortletDAO.java

Rule Violation Ligne
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 79

fr/paris/lutece/plugins/newsletter/business/portlet/NewsLetterArchivePortlet.java

Rule Violation Ligne
MissingOverride The method 'getXmlDocument(HttpServletRequest)' is missing an @Override annotation. 6871
MissingOverride The method 'getXml(HttpServletRequest)' is missing an @Override annotation. 80101
MissingOverride The method 'remove()' is missing an @Override annotation. 114117

fr/paris/lutece/plugins/newsletter/business/portlet/NewsLetterArchivePortletDAO.java

Rule Violation Ligne
MissingOverride The method 'insert(Portlet)' is missing an @Override annotation. 6568
MissingOverride The method 'delete(int)' is missing an @Override annotation. 7783
MissingOverride The method 'load(int)' is missing an @Override annotation. 92110
MissingOverride The method 'store(Portlet)' is missing an @Override annotation. 118121
MissingOverride The method 'insertSending(int, int, Plugin)' is missing an @Override annotation. 131139
MissingOverride The method 'removeSending(int, int, Plugin)' is missing an @Override annotation. 149157
MissingOverride The method 'findSendingsInPortlet(int, Plugin)' is missing an @Override annotation. 166182
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 166
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 168

fr/paris/lutece/plugins/newsletter/business/portlet/NewsLetterArchivePortletHome.java

Rule Violation Ligne
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 5864
MissingOverride The method 'getPortletTypeId()' is missing an @Override annotation. 7177
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strPortletTypeId' 76
MissingOverride The method 'getDAO()' is missing an @Override annotation. 9497
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 132

fr/paris/lutece/plugins/newsletter/business/portlet/NewsLetterSubscriptionPortlet.java

Rule Violation Ligne
MissingOverride The method 'compare(NewsLetter, NewsLetter)' is missing an @Override annotation. 98101
MissingOverride The method 'setPluginName(String)' is missing an @Override annotation. 114120
MissingOverride The method 'getXmlDocument(HttpServletRequest)' is missing an @Override annotation. 129132
CyclomaticComplexity The method 'getXml(HttpServletRequest)' has a cyclomatic complexity of 12. 141246
MissingOverride The method 'getXml(HttpServletRequest)' is missing an @Override annotation. 141246
ExcessiveMethodLength Avoid really long methods. 141246
NPathComplexity The method 'getXml(HttpServletRequest)' has an NPath complexity of 960 141246
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. 259262

fr/paris/lutece/plugins/newsletter/business/portlet/NewsLetterSubscriptionPortletDAO.java

Rule Violation Ligne
MissingOverride The method 'insert(Portlet)' is missing an @Override annotation. 6568
MissingOverride The method 'delete(int)' is missing an @Override annotation. 7783
MissingOverride The method 'load(int)' is missing an @Override annotation. 92110
MissingOverride The method 'store(Portlet)' is missing an @Override annotation. 118121
MissingOverride The method 'insertSubscription(int, int)' is missing an @Override annotation. 131139
MissingOverride The method 'removeSubscription(int, int)' is missing an @Override annotation. 149157
MissingOverride The method 'findSelectedNewsletters(int)' is missing an @Override annotation. 166182
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 168

fr/paris/lutece/plugins/newsletter/business/portlet/NewsLetterSubscriptionPortletHome.java

Rule Violation Ligne
MissingOverride The method 'getPortletTypeId()' is missing an @Override annotation. 5965
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strPortletTypeId' 64
MissingOverride The method 'getDAO()' is missing an @Override annotation. 8285

fr/paris/lutece/plugins/newsletter/business/topic/FreeHtmlTopicDao.java

Rule Violation Ligne
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

fr/paris/lutece/plugins/newsletter/business/topic/NewsletterTopic.java

Rule Violation Ligne
CyclomaticComplexity The method 'compareTo(NewsletterTopic)' has a cyclomatic complexity of 12. 192228
ShortVariable Avoid variables with short names like o 192
ShortVariable Avoid variables with short names like o 250

fr/paris/lutece/plugins/newsletter/business/topic/NewsletterTopicDao.java

Rule Violation Ligne
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 139
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 178

fr/paris/lutece/plugins/newsletter/business/topic/NewsletterTopicHome.java

Rule Violation Ligne
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

fr/paris/lutece/plugins/newsletter/service/NewsLetterArchiveService.java

Rule Violation Ligne
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

fr/paris/lutece/plugins/newsletter/service/NewsLetterRegistrationService.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34435
AssignmentToNonFinalStatic Possible unsafe assignment to a non-final static field in a constructor. 93
CyclomaticComplexity The method 'doSubscription(HttpServletRequest)' has a cyclomatic complexity of 13. 129237
NPathComplexity The method 'doSubscription(HttpServletRequest)' has an NPath complexity of 579 129237
ExcessiveMethodLength Avoid really long methods. 129237
CollapsibleIfStatements These nested if statements could be combined 153157
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 212
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 212
CyclomaticComplexity The method 'doConfirmSubscribe(HttpServletRequest)' has a cyclomatic complexity of 10. 247328
CyclomaticComplexity The method 'doUnSubscribe(HttpServletRequest)' has a cyclomatic complexity of 10. 338381
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 104 characters appended. 410
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 411

fr/paris/lutece/plugins/newsletter/service/NewsletterFileService.java

Rule Violation Ligne
CommentRequired Header comments are required 14101
CommentRequired Public method and constructor comments are required 1627
CommentRequired Public method and constructor comments are required 2931
CommentRequired Public method and constructor comments are required 3251
ConfusingTernary Avoid if (x != y) ..; else ..; 3845
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 47
CommentRequired Public method and constructor comments are required 5375
ConfusingTernary Avoid if (x != y) ..; else ..; 6168
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 71
CommentRequired Public method and constructor comments are required 7788
CommentRequired Public method and constructor comments are required 89100

fr/paris/lutece/plugins/newsletter/service/NewsletterPlugin.java

Rule Violation Ligne
MissingOverride The method 'init()' is missing an @Override annotation. 5358

fr/paris/lutece/plugins/newsletter/service/NewsletterResourceIdService.java

Rule Violation Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 124127
MissingOverride The method 'register()' is missing an @Override annotation. 132196
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. 205208
MissingOverride The method 'getTitle(String, Locale)' is missing an @Override annotation. 219229
ConfusingTernary Avoid if (x != y) ..; else ..; 228

fr/paris/lutece/plugins/newsletter/service/NewsletterService.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34541
GodClass Possible God Class (WMC=51, ATFD=65, TCC=0.000%) 83541
ConfusingTernary Avoid if (x != y) ..; else ..; 143151
ShortVariable Avoid variables with short names like t 156
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 167
UnnecessaryWrapperObjectCreation Unnecessary wrapper object creation 206
IdenticalCatchBranches 'catch' branch identical to 'UnsupportedEncodingException' branch 242245
CyclomaticComplexity The method 'generateNewsletterHtmlCode(NewsLetter, int, String, AdminUser, Locale)' has a cyclomatic complexity of 13. 301381
NPathComplexity The method 'generateNewsletterHtmlCode(NewsLetter, int, String, AdminUser, Locale)' has an NPath complexity of 300 301381
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 311
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 311
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 319
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 348

fr/paris/lutece/plugins/newsletter/service/NewsletterTemplateResourceIdService.java

Rule Violation Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 7073
MissingOverride The method 'register()' is missing an @Override annotation. 78102
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. 111114
MissingOverride The method 'getTitle(String, Locale)' is missing an @Override annotation. 125136
ConfusingTernary Avoid if (x != y) ..; else ..; 135

fr/paris/lutece/plugins/newsletter/service/SubscriberCleaningDaemon.java

Rule Violation Ligne
MissingOverride The method 'run()' is missing an @Override annotation. 4649

fr/paris/lutece/plugins/newsletter/service/topic/FreeHtmlTopicService.java

Rule Violation Ligne
MissingOverride The method 'hasConfiguration()' is missing an @Override annotation. 103106
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 ..; 193200

fr/paris/lutece/plugins/newsletter/service/topic/NewsletterTopicService.java

Rule Violation Ligne
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 222

fr/paris/lutece/plugins/newsletter/util/HtmlDomDocNewsletter.java

Rule Violation Ligne
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 222227
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

fr/paris/lutece/plugins/newsletter/util/NewsLetterConstants.java

Rule Violation Ligne
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 165
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 166
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 167

fr/paris/lutece/plugins/newsletter/util/NewsletterUtils.java

Rule Violation Ligne
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 ..; 157164
CommentRequired Public method and constructor comments are required 227230

fr/paris/lutece/plugins/newsletter/web/NewsLetterApp.java

Rule Violation Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 65277
UncommentedEmptyMethodBody Document empty method body 100101
MissingOverride The method 'getPage(HttpServletRequest, int, Plugin)' is missing an @Override annotation. 116151
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 121
ConfusingTernary Avoid if (x != y) ..; else ..; 166197
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 178
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 266
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 266

fr/paris/lutece/plugins/newsletter/web/NewsletterJspBean.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 342610
ExcessivePublicCount This class has a bunch of public methods and attributes 342610
CyclomaticComplexity The class 'NewsletterJspBean' has a total cyclomatic complexity of 227 (highest 19). 1152610
ExcessiveClassLength Avoid really long classes. 1152610
TooManyMethods This class has too many methods, consider refactoring it. 1162610
ImmutableField Private field '_newsletterService' could be made final; it is only initialized in the declaration or constructor. 335
ImmutableField Private field '_newsletterTopicService' could be made final; it is only initialized in the declaration or constructor. 336
CallSuperInConstructor It is a good practice to call super() in a constructor 341344
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 359
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 359
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 363
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 367
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 367
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 402403
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 432
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 432
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 438439
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 470
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 470
ConfusingTernary Avoid if (x != y) ..; else ..; 510517
ConfusingTernary Avoid if (x != y) ..; else ..; 519526
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 552
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 552
CyclomaticComplexity The method 'getComposeNewsLetter(HttpServletRequest)' has a cyclomatic complexity of 10. 581662
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 586
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 602
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 602
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 688
NPathComplexity The method 'doCreateNewsLetter(HttpServletRequest)' has an NPath complexity of 672 730805
CyclomaticComplexity The method 'doCreateNewsLetter(HttpServletRequest)' has a cyclomatic complexity of 15. 730805
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 ..; 784791
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 818
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 818
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 818
CyclomaticComplexity The method 'doModifyNewsLetter(HttpServletRequest)' has a cyclomatic complexity of 12. 855931
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 ..; 11461155
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 13281329
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
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 1430
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 1430
ConfusingTernary Avoid if (x != y) ..; else ..; 14331440
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 1509
NPathComplexity The method 'doConfirmSendNewsLetter(HttpServletRequest)' has an NPath complexity of 324 15241581
CyclomaticComplexity The method 'doConfirmSendNewsLetter(HttpServletRequest)' has a cyclomatic complexity of 11. 15241581
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 ..; 17571790
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. 18641964
CyclomaticComplexity The method 'doImportSubscribers(HttpServletRequest)' has a cyclomatic complexity of 19. 18641964
NPathComplexity The method 'doImportSubscribers(HttpServletRequest)' has an NPath complexity of 1410 18641964
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 ..; 19321951
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
NPathComplexity The method 'getManageNewsletterTopics(HttpServletRequest)' has an NPath complexity of 1440 20182143
CyclomaticComplexity The method 'getManageNewsletterTopics(HttpServletRequest)' has a cyclomatic complexity of 15. 20182143
ExcessiveMethodLength Avoid really long methods. 20182143
NcssCount The method 'getManageNewsletterTopics(HttpServletRequest)' has a NCSS line count of 78. 20182143
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 2063
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 2063
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 2085
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 20902091
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 2290
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 2290
LinguisticNaming Linguistics Antipattern - The method 'isWrongEmail' indicates linguistically it returns a boolean, but it returns 'String' 23992416
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 24072413
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 2457
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 24652473
UseTryWithResources Consider using a try-with-resources statement instead of explicitly closing the resource 25132540
LinguisticNaming Linguistics Antipattern - The setter 'setHtmlTemplateEmail' should not return any type except void linguistically 25562572
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 2558
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 2558
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 2583
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 2584

fr/paris/lutece/plugins/newsletter/web/NewsletterTemplateJspBean.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34849
CyclomaticComplexity The class 'NewsletterTemplateJspBean' has a total cyclomatic complexity of 89 (highest 24). 94849
GodClass Possible God Class (WMC=89, ATFD=241, TCC=13.636%) 94849
UnusedPrivateField Avoid unused private fields such as 'MESSAGE_IMAGE_FILE_ALREADY_EXISTS'. 121
ImmutableField Private field '_newsletterTopicService' could be made final; it is only initialized in the declaration or constructor. 150
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 163
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 163
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 168
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 172
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 172
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 239
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 239
CyclomaticComplexity The method 'doCreateNewsletterTemplate(HttpServletRequest)' has a cyclomatic complexity of 17. 255318
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 312
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 343
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 343
NcssCount The method 'doModifyNewsletterTemplate(HttpServletRequest)' has a NCSS line count of 67. 360490
ExcessiveMethodLength Avoid really long methods. 360490
NPathComplexity The method 'doModifyNewsletterTemplate(HttpServletRequest)' has an NPath complexity of 18722 360490
CyclomaticComplexity The method 'doModifyNewsletterTemplate(HttpServletRequest)' has a cyclomatic complexity of 24. 360490
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 381
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 390
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 393
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 394
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 484
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 504
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 504
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 504
UseTryWithResources Consider using a try-with-resources statement instead of explicitly closing the resource 525575
CyclomaticComplexity The method 'doModifyNewsletterTemplateFile(HttpServletRequest)' has a cyclomatic complexity of 14. 591702
NcssCount The method 'doModifyNewsletterTemplateFile(HttpServletRequest)' has a NCSS line count of 61. 591702
ExcessiveMethodLength Avoid really long methods. 591702
NPathComplexity The method 'doModifyNewsletterTemplateFile(HttpServletRequest)' has an NPath complexity of 273 591702
UseTryWithResources Consider using a try-with-resources statement instead of explicitly closing the resource 594699
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 613
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 692
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 723

fr/paris/lutece/plugins/newsletter/web/portlet/NewsLetterArchivePortletJspBean.java

Rule Violation Ligne
MissingOverride The method 'getCreate(HttpServletRequest)' is missing an @Override annotation. 93108
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 100
MissingOverride The method 'doCreate(HttpServletRequest)' is missing an @Override annotation. 117150
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. 159185
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 169
MissingOverride The method 'doModify(HttpServletRequest)' is missing an @Override annotation. 194227
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

fr/paris/lutece/plugins/newsletter/web/portlet/NewsLetterSubscriptionPortletJspBean.java

Rule Violation Ligne
MissingOverride The method 'getCreate(HttpServletRequest)' is missing an @Override annotation. 102118
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. 127161
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. 170195
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 179
MissingOverride The method 'doModify(HttpServletRequest)' is missing an @Override annotation. 204237
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

Priority 4

fr/paris/lutece/plugins/newsletter/business/NewsLetterHome.java

Rule Violation Ligne
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.sql.Timestamp' due to existing import 'java.sql.Timestamp' 242

fr/paris/lutece/plugins/newsletter/business/Pair.java

Rule Violation Ligne
ShortClassName Avoid short class names like Pair 4681

fr/paris/lutece/plugins/newsletter/business/Subscriber.java

Rule Violation Ligne
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 118121

fr/paris/lutece/plugins/newsletter/service/NewsletterFileService.java

Rule Violation Ligne
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'fr.paris.lutece.portal.service.util.AppLogService.error' due to existing import 'fr.paris.lutece.portal.service.util.AppLogService' 49
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'fr.paris.lutece.portal.service.util.AppLogService.error' due to existing import 'fr.paris.lutece.portal.service.util.AppLogService' 73

fr/paris/lutece/plugins/newsletter/util/HtmlDomDocNewsletter.java

Rule Violation Ligne
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.w3c.dom.Document' due to existing import 'org.w3c.dom.Document' 239

fr/paris/lutece/plugins/newsletter/util/NewsletterUtils.java

Rule Violation Ligne
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

fr/paris/lutece/plugins/newsletter/web/NewsletterJspBean.java

Rule Violation Ligne
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
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.util.ArrayList' due to existing import 'java.util.ArrayList' 2108

fr/paris/lutece/plugins/newsletter/web/NewsletterTemplateJspBean.java

Rule Violation Ligne
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'fr.paris.lutece.plugins.newsletter.util.NewsLetterConstants.MARK_TEMPLATE_FILE' due to existing import 'fr.paris.lutece.plugins.newsletter.util.NewsLetterConstants' 542

Fichiers

fr/paris/lutece/plugins/newsletter/business/AwaitingActivationDAO.java

Rule Violation Priority Ligne
MissingOverride The method 'delete(int, int, Plugin)' is missing an @Override annotation. 3 5968
MissingOverride The method 'exists(int, int, Plugin)' is missing an @Override annotation. 3 8194
MissingOverride The method 'insert(int, int, Plugin)' is missing an @Override annotation. 3 106115

fr/paris/lutece/plugins/newsletter/business/INewsLetterDAO.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 50265

fr/paris/lutece/plugins/newsletter/business/ISendingNewsLetterDAO.java

Rule Violation Priority Ligne
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

fr/paris/lutece/plugins/newsletter/business/NewsLetter.java

Rule Violation Priority Ligne
TooManyFields Too many fields 3 46445
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 7786
MissingOverride The method 'getWorkgroup()' is missing an @Override annotation. 3 326329
MissingOverride The method 'getResourceId()' is missing an @Override annotation. 3 410413
AddEmptyString Do not add empty strings 3 412
MissingOverride The method 'getResourceTypeCode()' is missing an @Override annotation. 3 420423

fr/paris/lutece/plugins/newsletter/business/NewsLetterDAO.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 50527
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 468476
ConfusingTernary Avoid if (x != y) ..; else ..; 3 498506

fr/paris/lutece/plugins/newsletter/business/NewsLetterHome.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 49316
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.sql.Timestamp' due to existing import 'java.sql.Timestamp' 4 242

fr/paris/lutece/plugins/newsletter/business/NewsLetterTemplate.java

Rule Violation Priority Ligne
FieldNamingConventions The field name 'strFileKey' doesn't match '_[a-z][a-zA-Z0-9]*' 1 54
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 6269
MissingOverride The method 'getWorkgroup()' is missing an @Override annotation. 3 181184
MissingOverride The method 'getResourceId()' is missing an @Override annotation. 3 202205
MissingOverride The method 'getResourceTypeCode()' is missing an @Override annotation. 3 212215

fr/paris/lutece/plugins/newsletter/business/NewsLetterTemplateDAO.java

Rule Violation Priority Ligne
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 311319

fr/paris/lutece/plugins/newsletter/business/NewsletterPropertiesDAO.java

Rule Violation Priority Ligne
MissingOverride The method 'load(Plugin)' is missing an @Override annotation. 3 5783
MissingOverride The method 'store(NewsLetterProperties, Plugin)' is missing an @Override annotation. 3 93102

fr/paris/lutece/plugins/newsletter/business/NewsletterTemplateRemovalListener.java

Rule Violation Priority Ligne
ShortVariable Avoid variables with short names like id 3 63

fr/paris/lutece/plugins/newsletter/business/NewsletterTemplateWorkgroupRemovalListener.java

Rule Violation Priority Ligne
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 3 5876
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 3 8791

fr/paris/lutece/plugins/newsletter/business/NewsletterWorkgroupRemovalListener.java

Rule Violation Priority Ligne
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 3 5876
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 3 8791

fr/paris/lutece/plugins/newsletter/business/Pair.java

Rule Violation Priority Ligne
ShortClassName Avoid short class names like Pair 4 4681
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

fr/paris/lutece/plugins/newsletter/business/SendingNewsLetterDAO.java

Rule Violation Priority Ligne
MissingOverride The method 'insert(SendingNewsLetter, Plugin)' is missing an @Override annotation. 3 6883
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 3 9399
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 110133
MissingOverride The method 'store(SendingNewsLetter, Plugin)' is missing an @Override annotation. 3 143150
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the checkPrimaryKey method if you want a default access modifier 3 161177
DefaultPackage Use explicit scoping instead of the default package private level 3 161177
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the newPrimaryKey method if you want a default access modifier 3 186204
DefaultPackage Use explicit scoping instead of the default package private level 3 186204
MissingOverride The method 'selectLastSendingForNewsletterId(int, Plugin)' is missing an @Override annotation. 3 215237
MissingOverride The method 'selectAllLastSendingForNewsletterId(int, Plugin)' is missing an @Override annotation. 3 248272
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 251
MissingOverride The method 'findAllSendings(Plugin)' is missing an @Override annotation. 3 281304
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 283
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
MissingOverride The method 'findSendingsByIds(ArrayList, Plugin)' is missing an @Override annotation. 3 315340
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 317

fr/paris/lutece/plugins/newsletter/business/SendingNewsLetterHome.java

Rule Violation Priority Ligne
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

fr/paris/lutece/plugins/newsletter/business/Subscriber.java

Rule Violation Priority Ligne
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 118121

fr/paris/lutece/plugins/newsletter/business/SubscriberDAO.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 46421
MissingOverride The method 'insert(Subscriber, Plugin)' is missing an @Override annotation. 3 7284
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 3 94100
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 111128
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the checkPrimaryKey method if you want a default access modifier 3 139155
DefaultPackage Use explicit scoping instead of the default package private level 3 139155
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the newPrimaryKey method if you want a default access modifier 3 164183
DefaultPackage Use explicit scoping instead of the default package private level 3 164183
MissingOverride The method 'selectAll(Plugin)' is missing an @Override annotation. 3 192211
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 197
MissingOverride The method 'selectByEmail(String, Plugin)' is missing an @Override annotation. 3 222240
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 251272
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 289316
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 333360
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 344
MissingOverride The method 'selectNewsLetters(int, Plugin)' is missing an @Override annotation. 3 371392
MissingOverride The method 'selectSubscribersList(Plugin)' is missing an @Override annotation. 3 401420
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 407

fr/paris/lutece/plugins/newsletter/business/portlet/INewsLetterArchivePortletDAO.java

Rule Violation Priority Ligne
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 3 79

fr/paris/lutece/plugins/newsletter/business/portlet/NewsLetterArchivePortlet.java

Rule Violation Priority Ligne
MissingOverride The method 'getXmlDocument(HttpServletRequest)' is missing an @Override annotation. 3 6871
MissingOverride The method 'getXml(HttpServletRequest)' is missing an @Override annotation. 3 80101
MissingOverride The method 'remove()' is missing an @Override annotation. 3 114117

fr/paris/lutece/plugins/newsletter/business/portlet/NewsLetterArchivePortletDAO.java

Rule Violation Priority Ligne
MissingOverride The method 'insert(Portlet)' is missing an @Override annotation. 3 6568
MissingOverride The method 'delete(int)' is missing an @Override annotation. 3 7783
MissingOverride The method 'load(int)' is missing an @Override annotation. 3 92110
MissingOverride The method 'store(Portlet)' is missing an @Override annotation. 3 118121
MissingOverride The method 'insertSending(int, int, Plugin)' is missing an @Override annotation. 3 131139
MissingOverride The method 'removeSending(int, int, Plugin)' is missing an @Override annotation. 3 149157
MissingOverride The method 'findSendingsInPortlet(int, Plugin)' is missing an @Override annotation. 3 166182
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

fr/paris/lutece/plugins/newsletter/business/portlet/NewsLetterArchivePortletHome.java

Rule Violation Priority Ligne
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 5864
MissingOverride The method 'getPortletTypeId()' is missing an @Override annotation. 3 7177
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 9497
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 3 132

fr/paris/lutece/plugins/newsletter/business/portlet/NewsLetterSubscriptionPortlet.java

Rule Violation Priority Ligne
MissingOverride The method 'compare(NewsLetter, NewsLetter)' is missing an @Override annotation. 3 98101
MissingOverride The method 'setPluginName(String)' is missing an @Override annotation. 3 114120
MissingOverride The method 'getXmlDocument(HttpServletRequest)' is missing an @Override annotation. 3 129132
CyclomaticComplexity The method 'getXml(HttpServletRequest)' has a cyclomatic complexity of 12. 3 141246
MissingOverride The method 'getXml(HttpServletRequest)' is missing an @Override annotation. 3 141246
ExcessiveMethodLength Avoid really long methods. 3 141246
NPathComplexity The method 'getXml(HttpServletRequest)' has an NPath complexity of 960 3 141246
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 259262

fr/paris/lutece/plugins/newsletter/business/portlet/NewsLetterSubscriptionPortletDAO.java

Rule Violation Priority Ligne
MissingOverride The method 'insert(Portlet)' is missing an @Override annotation. 3 6568
MissingOverride The method 'delete(int)' is missing an @Override annotation. 3 7783
MissingOverride The method 'load(int)' is missing an @Override annotation. 3 92110
MissingOverride The method 'store(Portlet)' is missing an @Override annotation. 3 118121
MissingOverride The method 'insertSubscription(int, int)' is missing an @Override annotation. 3 131139
MissingOverride The method 'removeSubscription(int, int)' is missing an @Override annotation. 3 149157
MissingOverride The method 'findSelectedNewsletters(int)' is missing an @Override annotation. 3 166182
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 168

fr/paris/lutece/plugins/newsletter/business/portlet/NewsLetterSubscriptionPortletHome.java

Rule Violation Priority Ligne
MissingOverride The method 'getPortletTypeId()' is missing an @Override annotation. 3 5965
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 8285

fr/paris/lutece/plugins/newsletter/business/topic/FreeHtmlTopicDao.java

Rule Violation Priority Ligne
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

fr/paris/lutece/plugins/newsletter/business/topic/NewsletterTopic.java

Rule Violation Priority Ligne
CyclomaticComplexity The method 'compareTo(NewsletterTopic)' has a cyclomatic complexity of 12. 3 192228
ShortVariable Avoid variables with short names like o 3 192
ShortVariable Avoid variables with short names like o 3 250

fr/paris/lutece/plugins/newsletter/business/topic/NewsletterTopicDao.java

Rule Violation Priority Ligne
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 139
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 178

fr/paris/lutece/plugins/newsletter/business/topic/NewsletterTopicHome.java

Rule Violation Priority Ligne
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

fr/paris/lutece/plugins/newsletter/service/NewsLetterArchiveService.java

Rule Violation Priority Ligne
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

fr/paris/lutece/plugins/newsletter/service/NewsLetterRegistrationService.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34435
AssignmentToNonFinalStatic Possible unsafe assignment to a non-final static field in a constructor. 3 93
CyclomaticComplexity The method 'doSubscription(HttpServletRequest)' has a cyclomatic complexity of 13. 3 129237
NPathComplexity The method 'doSubscription(HttpServletRequest)' has an NPath complexity of 579 3 129237
ExcessiveMethodLength Avoid really long methods. 3 129237
CollapsibleIfStatements These nested if statements could be combined 3 153157
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 212
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 212
CyclomaticComplexity The method 'doConfirmSubscribe(HttpServletRequest)' has a cyclomatic complexity of 10. 3 247328
CyclomaticComplexity The method 'doUnSubscribe(HttpServletRequest)' has a cyclomatic complexity of 10. 3 338381
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 104 characters appended. 3 410
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 411

fr/paris/lutece/plugins/newsletter/service/NewsletterFileService.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 14101
CommentRequired Public method and constructor comments are required 3 1627
CommentRequired Public method and constructor comments are required 3 2931
CommentRequired Public method and constructor comments are required 3 3251
ConfusingTernary Avoid if (x != y) ..; else ..; 3 3845
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 47
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'fr.paris.lutece.portal.service.util.AppLogService.error' due to existing import 'fr.paris.lutece.portal.service.util.AppLogService' 4 49
CommentRequired Public method and constructor comments are required 3 5375
ConfusingTernary Avoid if (x != y) ..; else ..; 3 6168
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 71
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'fr.paris.lutece.portal.service.util.AppLogService.error' due to existing import 'fr.paris.lutece.portal.service.util.AppLogService' 4 73
CommentRequired Public method and constructor comments are required 3 7788
CommentRequired Public method and constructor comments are required 3 89100

fr/paris/lutece/plugins/newsletter/service/NewsletterPlugin.java

Rule Violation Priority Ligne
MissingOverride The method 'init()' is missing an @Override annotation. 3 5358

fr/paris/lutece/plugins/newsletter/service/NewsletterResourceIdService.java

Rule Violation Priority Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 3 124127
MissingOverride The method 'register()' is missing an @Override annotation. 3 132196
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 205208
MissingOverride The method 'getTitle(String, Locale)' is missing an @Override annotation. 3 219229
ConfusingTernary Avoid if (x != y) ..; else ..; 3 228

fr/paris/lutece/plugins/newsletter/service/NewsletterService.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34541
GodClass Possible God Class (WMC=51, ATFD=65, TCC=0.000%) 3 83541
ConfusingTernary Avoid if (x != y) ..; else ..; 3 143151
ShortVariable Avoid variables with short names like t 3 156
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 167
UnnecessaryWrapperObjectCreation Unnecessary wrapper object creation 3 206
IdenticalCatchBranches 'catch' branch identical to 'UnsupportedEncodingException' branch 3 242245
CyclomaticComplexity The method 'generateNewsletterHtmlCode(NewsLetter, int, String, AdminUser, Locale)' has a cyclomatic complexity of 13. 3 301381
NPathComplexity The method 'generateNewsletterHtmlCode(NewsLetter, int, String, AdminUser, Locale)' has an NPath complexity of 300 3 301381
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 311
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 311
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 319
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 348
LocalVariableNamingConventions The local variable name '_bTemplate' doesn't match '[a-z][a-zA-Z0-9]*' 1 367

fr/paris/lutece/plugins/newsletter/service/NewsletterTemplateResourceIdService.java

Rule Violation Priority Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 3 7073
MissingOverride The method 'register()' is missing an @Override annotation. 3 78102
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 111114
MissingOverride The method 'getTitle(String, Locale)' is missing an @Override annotation. 3 125136
ConfusingTernary Avoid if (x != y) ..; else ..; 3 135

fr/paris/lutece/plugins/newsletter/service/SubscriberCleaningDaemon.java

Rule Violation Priority Ligne
MissingOverride The method 'run()' is missing an @Override annotation. 3 4649

fr/paris/lutece/plugins/newsletter/service/topic/FreeHtmlTopicService.java

Rule Violation Priority Ligne
MissingOverride The method 'hasConfiguration()' is missing an @Override annotation. 3 103106
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 193200

fr/paris/lutece/plugins/newsletter/service/topic/NewsletterTopicService.java

Rule Violation Priority Ligne
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 222

fr/paris/lutece/plugins/newsletter/util/HtmlDomDocNewsletter.java

Rule Violation Priority Ligne
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 222227
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

fr/paris/lutece/plugins/newsletter/util/NewsLetterConstants.java

Rule Violation Priority Ligne
ClassNamingConventions The utility class name 'NewsLetterConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 41168
FieldNamingConventions The public constant name 'PROPERTY_FileProviderStore' doesn't match '[A-Z][A-Z_0-9]*' 1 47
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 3 165
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 3 166
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 3 167

fr/paris/lutece/plugins/newsletter/util/NewsletterUtils.java

Rule Violation Priority Ligne
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 157164
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 227230

fr/paris/lutece/plugins/newsletter/web/NewsLetterApp.java

Rule Violation Priority Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 65277
UncommentedEmptyMethodBody Document empty method body 3 100101
MissingOverride The method 'getPage(HttpServletRequest, int, Plugin)' is missing an @Override annotation. 3 116151
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 121
ConfusingTernary Avoid if (x != y) ..; else ..; 3 166197
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 178
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 266
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 266

fr/paris/lutece/plugins/newsletter/web/NewsletterJspBean.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 342610
ExcessivePublicCount This class has a bunch of public methods and attributes 3 342610
CyclomaticComplexity The class 'NewsletterJspBean' has a total cyclomatic complexity of 227 (highest 19). 3 1152610
ExcessiveClassLength Avoid really long classes. 3 1152610
TooManyMethods This class has too many methods, consider refactoring it. 3 1162610
ImmutableField Private field '_newsletterService' could be made final; it is only initialized in the declaration or constructor. 3 335
ImmutableField Private field '_newsletterTopicService' could be made final; it is only initialized in the declaration or constructor. 3 336
CallSuperInConstructor It is a good practice to call super() in a constructor 3 341344
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 359
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 359
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 363
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 367
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 367
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 402403
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 432
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 432
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 438439
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 470
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 470
ConfusingTernary Avoid if (x != y) ..; else ..; 3 510517
ConfusingTernary Avoid if (x != y) ..; else ..; 3 519526
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 552
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 552
CyclomaticComplexity The method 'getComposeNewsLetter(HttpServletRequest)' has a cyclomatic complexity of 10. 3 581662
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 586
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 602
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 602
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 688
NPathComplexity The method 'doCreateNewsLetter(HttpServletRequest)' has an NPath complexity of 672 3 730805
CyclomaticComplexity The method 'doCreateNewsLetter(HttpServletRequest)' has a cyclomatic complexity of 15. 3 730805
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 784791
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 818
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 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 855931
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 11461155
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 13281329
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
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 1430
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 1430
ConfusingTernary Avoid if (x != y) ..; else ..; 3 14331440
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 15241581
CyclomaticComplexity The method 'doConfirmSendNewsLetter(HttpServletRequest)' has a cyclomatic complexity of 11. 3 15241581
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 17571790
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 18641964
CyclomaticComplexity The method 'doImportSubscribers(HttpServletRequest)' has a cyclomatic complexity of 19. 3 18641964
NPathComplexity The method 'doImportSubscribers(HttpServletRequest)' has an NPath complexity of 1410 3 18641964
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 19321951
AvoidThrowingRawExceptionTypes Avoid throwing raw exception types. 1 1962
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 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
NPathComplexity The method 'getManageNewsletterTopics(HttpServletRequest)' has an NPath complexity of 1440 3 20182143
CyclomaticComplexity The method 'getManageNewsletterTopics(HttpServletRequest)' has a cyclomatic complexity of 15. 3 20182143
ExcessiveMethodLength Avoid really long methods. 3 20182143
NcssCount The method 'getManageNewsletterTopics(HttpServletRequest)' has a NCSS line count of 78. 3 20182143
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 2063
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 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 20902091
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.util.ArrayList' due to existing import 'java.util.ArrayList' 4 2108
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 2290
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 2290
LinguisticNaming Linguistics Antipattern - The method 'isWrongEmail' indicates linguistically it returns a boolean, but it returns 'String' 3 23992416
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 24072413
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 2457
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 24652473
UseTryWithResources Consider using a try-with-resources statement instead of explicitly closing the resource 3 25132540
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 1 2515
LinguisticNaming Linguistics Antipattern - The setter 'setHtmlTemplateEmail' should not return any type except void linguistically 3 25562572
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 2558
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 2558
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 2583
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 2584

fr/paris/lutece/plugins/newsletter/web/NewsletterTemplateJspBean.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34849
CyclomaticComplexity The class 'NewsletterTemplateJspBean' has a total cyclomatic complexity of 89 (highest 24). 3 94849
GodClass Possible God Class (WMC=89, ATFD=241, TCC=13.636%) 3 94849
UnusedPrivateField Avoid unused private fields such as 'MESSAGE_IMAGE_FILE_ALREADY_EXISTS'. 3 121
ImmutableField Private field '_newsletterTopicService' could be made final; it is only initialized in the declaration or constructor. 3 150
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 163
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 163
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 168
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 172
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 172
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 239
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 239
CyclomaticComplexity The method 'doCreateNewsletterTemplate(HttpServletRequest)' has a cyclomatic complexity of 17. 3 255318
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 312
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 343
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 343
NcssCount The method 'doModifyNewsletterTemplate(HttpServletRequest)' has a NCSS line count of 67. 3 360490
ExcessiveMethodLength Avoid really long methods. 3 360490
NPathComplexity The method 'doModifyNewsletterTemplate(HttpServletRequest)' has an NPath complexity of 18722 3 360490
CyclomaticComplexity The method 'doModifyNewsletterTemplate(HttpServletRequest)' has a cyclomatic complexity of 24. 3 360490
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 381
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 390
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 393
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 394
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 484
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 504
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 504
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 504
UseTryWithResources Consider using a try-with-resources statement instead of explicitly closing the resource 3 525575
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 1 534
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 1 537
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'fr.paris.lutece.plugins.newsletter.util.NewsLetterConstants.MARK_TEMPLATE_FILE' due to existing import 'fr.paris.lutece.plugins.newsletter.util.NewsLetterConstants' 4 542
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 1 547
CyclomaticComplexity The method 'doModifyNewsletterTemplateFile(HttpServletRequest)' has a cyclomatic complexity of 14. 3 591702
NcssCount The method 'doModifyNewsletterTemplateFile(HttpServletRequest)' has a NCSS line count of 61. 3 591702
ExcessiveMethodLength Avoid really long methods. 3 591702
NPathComplexity The method 'doModifyNewsletterTemplateFile(HttpServletRequest)' has an NPath complexity of 273 3 591702
UseTryWithResources Consider using a try-with-resources statement instead of explicitly closing the resource 3 594699
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 613
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 692
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 723

fr/paris/lutece/plugins/newsletter/web/portlet/NewsLetterArchivePortletJspBean.java

Rule Violation Priority Ligne
MissingOverride The method 'getCreate(HttpServletRequest)' is missing an @Override annotation. 3 93108
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 100
MissingOverride The method 'doCreate(HttpServletRequest)' is missing an @Override annotation. 3 117150
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 159185
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 169
MissingOverride The method 'doModify(HttpServletRequest)' is missing an @Override annotation. 3 194227
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

fr/paris/lutece/plugins/newsletter/web/portlet/NewsLetterSubscriptionPortletJspBean.java

Rule Violation Priority Ligne
MissingOverride The method 'getCreate(HttpServletRequest)' is missing an @Override annotation. 3 102118
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 127161
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 170195
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 179
MissingOverride The method 'doModify(HttpServletRequest)' is missing an @Override annotation. 3 204237
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