Fork me on GitHub

PMD Results

The following document contains the results of PMD 6.38.0.

Violations By Priority

Priority 1

org/apache/fulcrum/localization/LocaleTokenizer.java

Rule Violation Line
AvoidThrowingNullPointerException Avoid throwing null pointer exceptions. 175
AvoidThrowingNullPointerException Avoid throwing null pointer exceptions. 182

Priority 2

org/apache/fulcrum/localization/SimpleLocalizationServiceImpl.java

Rule Violation Line
AvoidReassigningParameters Avoid reassigning parameters such as 'bundleName' 285
AvoidReassigningParameters Avoid reassigning parameters such as 'locale' 289
AvoidReassigningParameters Avoid reassigning parameters such as 'locale' 492

Priority 3

org/apache/fulcrum/localization/DefaultLocalizationService.java

Rule Violation Line
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 76–79
MissingOverride The method 'getBundle(String, String)' is missing an @Override annotation. 92–95
MethodArgumentCouldBeFinal Parameter 'languageHeader' is not assigned and could be declared final 92
MethodArgumentCouldBeFinal Parameter 'bundleName' is not assigned and could be declared final 92
MissingOverride The method 'getBundle(HttpServletRequest)' is missing an @Override annotation. 105–108
MethodArgumentCouldBeFinal Parameter 'req' is not assigned and could be declared final 105
MethodArgumentCouldBeFinal Parameter 'bundleName' is not assigned and could be declared final 122
MissingOverride The method 'getBundle(String, HttpServletRequest)' is missing an @Override annotation. 122–125
MethodArgumentCouldBeFinal Parameter 'req' is not assigned and could be declared final 122
MethodArgumentCouldBeFinal Parameter 'req' is not assigned and could be declared final 130
MissingOverride The method 'getLocale(HttpServletRequest)' is missing an @Override annotation. 130–137
MethodArgumentCouldBeFinal Parameter 'header' is not assigned and could be declared final 142
MissingOverride The method 'getLocale(String)' is missing an @Override annotation. 142–155
LocalVariableCouldBeFinal Local variable 'tok' could be declared final 146
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 149

org/apache/fulcrum/localization/LocaleTokenizer.java

Rule Violation Line
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 61
ImmutableField Private field 'locales' could be made final; it is only initialized in the declaration or constructor. 61
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 61
MethodArgumentCouldBeFinal Parameter 'header' is not assigned and could be declared final 69
LocalVariableCouldBeFinal Local variable 'tok' could be declared final 71
LocalVariableCouldBeFinal Local variable 'acceptLang' could be declared final 74
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 74
AssignmentInOperand Avoid assignments in operands 80
ShortVariable Avoid variables with short names like q 82
LocalVariableCouldBeFinal Local variable 'q' could be declared final 82
AssignmentInOperand Avoid assignments in operands 84
EmptyCatchBlock Avoid empty catch blocks 91–94
AssignmentInOperand Avoid assignments in operands 102
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 105
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 109–110
MissingOverride The method 'hasNext()' is missing an @Override annotation. 123–126
MissingOverride The method 'next()' is missing an @Override annotation. 135–142
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 150
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the locale field if you want a default access modifier 163
DefaultPackage Use explicit scoping instead of the default package private level 163
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 163
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the quality field if you want a default access modifier 169
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 169
DefaultPackage Use explicit scoping instead of the default package private level 169
MethodArgumentCouldBeFinal Parameter 'acceptLang' is not assigned and could be declared final 172
IfStmtsMustUseBraces Avoid using if statements without curly braces 174–175
ControlStatementBraces This statement should have braces 175
ShortVariable Avoid variables with short names like q2 179
LocalVariableCouldBeFinal Local variable 'q2' could be declared final 179
ShortVariable Avoid variables with short names like o 188
MethodArgumentCouldBeFinal Parameter 'o' is not assigned and could be declared final 188
ControlStatementBraces This statement should have braces 189
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 189
IfStmtsMustUseBraces Avoid using if statements without curly braces 189
IfStmtsMustUseBraces Avoid using if statements without curly braces 190
ControlStatementBraces This statement should have braces 190
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 190
LocalVariableCouldBeFinal Local variable 'that' could be declared final 191

org/apache/fulcrum/localization/SimpleLocalizationService.java

Rule Violation Line
AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 132

org/apache/fulcrum/localization/SimpleLocalizationServiceImpl.java

Rule Violation Line
GodClass Possible God Class (WMC=61, ATFD=40, TCC=12.632%) 75–635
UnusedAssignment The field initializer for 'bundles' is never used (overwritten on line 116) 92
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 92
RedundantFieldInitializer Avoid using redundant field initializer for 'bundles' 92
LooseCoupling Avoid using implementation types like 'HashMap'; use the interface instead 92
RedundantFieldInitializer Avoid using redundant field initializer for 'bundleNames' 97
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 97
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 103
RedundantFieldInitializer Avoid using redundant field initializer for 'defaultLocale' 103
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 106
RedundantFieldInitializer Avoid using redundant field initializer for 'defaultLanguage' 106
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 109
RedundantFieldInitializer Avoid using redundant field initializer for 'defaultCountry' 109
CallSuperInConstructor It is a good practice to call super() in a constructor 114–117
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 116
MethodArgumentCouldBeFinal Parameter 'conf' is not assigned and could be declared final 128
LocalVariableCouldBeFinal Local variable 'jvmDefault' could be declared final 130
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 132–136
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 135
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 138–140
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 139
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 142–146
LocalVariableCouldBeFinal Local variable 'nameVal' could be declared final 150
LocalVariableCouldBeFinal Local variable 'val' could be declared final 154
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 155
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 171
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 173
MethodArgumentCouldBeFinal Parameter 'intBundleNames' is not assigned and could be declared final 182
IfElseStmtsMustUseBraces Avoid using if...else statements without curly braces 185
ControlStatementBraces This statement should have braces 185
IfElseStmtsMustUseBraces Avoid using if...else statements without curly braces 187
ControlStatementBraces This statement should have braces 187
MethodArgumentCouldBeFinal Parameter 'bundleName' is not assigned and could be declared final 264
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 286
UnusedAssignment The initializer for variable 'rb' is never used (overwritten on lines 298 and 307) 292
ShortVariable Avoid variables with short names like rb 292
LocalVariableCouldBeFinal Local variable 'bundlesByLocale' could be declared final 293
ConfusingTernary Avoid if (x != y) ..; else ..; 294–308
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 324–363
MethodArgumentCouldBeFinal Parameter 'bundleName' is not assigned and could be declared final 325
MethodArgumentCouldBeFinal Parameter 'locale' is not assigned and could be declared final 326
AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 327
ShortVariable Avoid variables with short names like rb 330
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 333
UnnecessaryCast Avoid unnecessary casts 333
LocalVariableCouldBeFinal Local variable 'bundlesByName' could be declared final 356–357
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 357
MethodArgumentCouldBeFinal Parameter 'bundleName' is not assigned and could be declared final 389
MethodArgumentCouldBeFinal Parameter 'locale' is not assigned and could be declared final 390
MethodArgumentCouldBeFinal Parameter 'bundlesByLocale' is not assigned and could be declared final 391
ShortVariable Avoid variables with short names like rb 393
LongVariable Avoid excessively long variable names like withDefaultCountry 402
LocalVariableCouldBeFinal Local variable 'withDefaultCountry' could be declared final 402–403
LongVariable Avoid excessively long variable names like withDefaultLanguage 414
LocalVariableCouldBeFinal Local variable 'withDefaultLanguage' could be declared final 414–415
UnnecessaryModifier Unnecessary modifier 'final' on method 'getBundleIgnoreException': private methods cannot be overridden 441–453
MethodArgumentCouldBeFinal Parameter 'bundleName' is not assigned and could be declared final 442
MethodArgumentCouldBeFinal Parameter 'locale' is not assigned and could be declared final 443
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 447
MethodArgumentCouldBeFinal Parameter 'defaultBundle' is not assigned and could be declared final 462
MethodArgumentCouldBeFinal Parameter 'key' is not assigned and could be declared final 486
MethodArgumentCouldBeFinal Parameter 'bundleName' is not assigned and could be declared final 486
AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 487
UnusedAssignment The initializer for variable 'value' is never used (overwritten on line 496) 489
ShortVariable Avoid variables with short names like rb 495
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 501–516
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 506
LocalVariableCouldBeFinal Local variable 'loc' could be declared final 520
LocalVariableCouldBeFinal Local variable 'mesg' could be declared final 521–529
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 530
MethodArgumentCouldBeFinal Parameter 'key' is not assigned and could be declared final 544
ShortVariable Avoid variables with short names like rb 559
MethodArgumentCouldBeFinal Parameter 'rb' is not assigned and could be declared final 559
MethodArgumentCouldBeFinal Parameter 'key' is not assigned and could be declared final 559
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 565
MethodArgumentCouldBeFinal Parameter 'bundleName' is not assigned and could be declared final 584
MethodArgumentCouldBeFinal Parameter 'locale' is not assigned and could be declared final 585
MethodArgumentCouldBeFinal Parameter 'key' is not assigned and could be declared final 586
MethodArgumentCouldBeFinal Parameter 'arg1' is not assigned and could be declared final 587
MethodArgumentCouldBeFinal Parameter 'bundleName' is not assigned and could be declared final 597
MethodArgumentCouldBeFinal Parameter 'locale' is not assigned and could be declared final 598
MethodArgumentCouldBeFinal Parameter 'key' is not assigned and could be declared final 599
MethodArgumentCouldBeFinal Parameter 'arg1' is not assigned and could be declared final 600
MethodArgumentCouldBeFinal Parameter 'arg2' is not assigned and could be declared final 601
MethodArgumentCouldBeFinal Parameter 'bundleName' is not assigned and could be declared final 620
MethodArgumentCouldBeFinal Parameter 'locale' is not assigned and could be declared final 621
MethodArgumentCouldBeFinal Parameter 'key' is not assigned and could be declared final 622
MethodArgumentCouldBeFinal Parameter 'args' is not assigned and could be declared final 623
LocalVariableCouldBeFinal Local variable 'formatLocale' could be declared final 627
LocalVariableCouldBeFinal Local variable 'value' could be declared final 628
LocalVariableCouldBeFinal Local variable 'formatArgs' could be declared final 630
LocalVariableCouldBeFinal Local variable 'messageFormat' could be declared final 632

Priority 4

org/apache/fulcrum/localization/LocaleTokenizer.java

Rule Violation Line
UselessParentheses Useless parentheses. 141

org/apache/fulcrum/localization/SimpleLocalizationService.java

Rule Violation Line
UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 189

org/apache/fulcrum/localization/SimpleLocalizationServiceImpl.java

Rule Violation Line
UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 182
UselessParentheses Useless parentheses. 232
UselessParentheses Useless parentheses. 286
UselessParentheses Useless parentheses. 331–333
UselessParentheses Useless parentheses. 337–339

Priority 5

org/apache/fulcrum/localization/SimpleLocalizationServiceImpl.java

Rule Violation Line
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'bundleName' (lines '151'-'156'). 151–156
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'bundleName' (lines '156'-'156'). 156
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'rb' (lines '292'-'298'). 292–298
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'rb' (lines '292'-'307'). 292–307
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'rb' (lines '342'-'346'). 342–346
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'rb' (lines '393'-'416'). 393–416
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'rb' (lines '393'-'404'). 393–404
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'value' (lines '489'-'496'). 489–496

Files

org/apache/fulcrum/localization/DefaultLocalizationService.java

Rule Violation Priority Line
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 76–79
MissingOverride The method 'getBundle(String, String)' is missing an @Override annotation. 3 92–95
MethodArgumentCouldBeFinal Parameter 'languageHeader' is not assigned and could be declared final 3 92
MethodArgumentCouldBeFinal Parameter 'bundleName' is not assigned and could be declared final 3 92
MissingOverride The method 'getBundle(HttpServletRequest)' is missing an @Override annotation. 3 105–108
MethodArgumentCouldBeFinal Parameter 'req' is not assigned and could be declared final 3 105
MethodArgumentCouldBeFinal Parameter 'bundleName' is not assigned and could be declared final 3 122
MissingOverride The method 'getBundle(String, HttpServletRequest)' is missing an @Override annotation. 3 122–125
MethodArgumentCouldBeFinal Parameter 'req' is not assigned and could be declared final 3 122
MethodArgumentCouldBeFinal Parameter 'req' is not assigned and could be declared final 3 130
MissingOverride The method 'getLocale(HttpServletRequest)' is missing an @Override annotation. 3 130–137
MethodArgumentCouldBeFinal Parameter 'header' is not assigned and could be declared final 3 142
MissingOverride The method 'getLocale(String)' is missing an @Override annotation. 3 142–155
LocalVariableCouldBeFinal Local variable 'tok' could be declared final 3 146
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 149

org/apache/fulcrum/localization/LocaleTokenizer.java

Rule Violation Priority Line
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 3 61
ImmutableField Private field 'locales' could be made final; it is only initialized in the declaration or constructor. 3 61
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 3 61
MethodArgumentCouldBeFinal Parameter 'header' is not assigned and could be declared final 3 69
LocalVariableCouldBeFinal Local variable 'tok' could be declared final 3 71
LocalVariableCouldBeFinal Local variable 'acceptLang' could be declared final 3 74
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 3 74
AssignmentInOperand Avoid assignments in operands 3 80
ShortVariable Avoid variables with short names like q 3 82
LocalVariableCouldBeFinal Local variable 'q' could be declared final 3 82
AssignmentInOperand Avoid assignments in operands 3 84
EmptyCatchBlock Avoid empty catch blocks 3 91–94
AssignmentInOperand Avoid assignments in operands 3 102
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 3 105
AvoidInstantiatingObjectsInLoops Avoid instantiating new objects inside loops 3 109–110
MissingOverride The method 'hasNext()' is missing an @Override annotation. 3 123–126
MissingOverride The method 'next()' is missing an @Override annotation. 3 135–142
UselessParentheses Useless parentheses. 4 141
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 150
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the locale field if you want a default access modifier 3 163
DefaultPackage Use explicit scoping instead of the default package private level 3 163
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 3 163
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the quality field if you want a default access modifier 3 169
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 3 169
DefaultPackage Use explicit scoping instead of the default package private level 3 169
MethodArgumentCouldBeFinal Parameter 'acceptLang' is not assigned and could be declared final 3 172
IfStmtsMustUseBraces Avoid using if statements without curly braces 3 174–175
AvoidThrowingNullPointerException Avoid throwing null pointer exceptions. 1 175
ControlStatementBraces This statement should have braces 3 175
ShortVariable Avoid variables with short names like q2 3 179
LocalVariableCouldBeFinal Local variable 'q2' could be declared final 3 179
AvoidThrowingNullPointerException Avoid throwing null pointer exceptions. 1 182
ShortVariable Avoid variables with short names like o 3 188
MethodArgumentCouldBeFinal Parameter 'o' is not assigned and could be declared final 3 188
ControlStatementBraces This statement should have braces 3 189
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 189
IfStmtsMustUseBraces Avoid using if statements without curly braces 3 189
IfStmtsMustUseBraces Avoid using if statements without curly braces 3 190
ControlStatementBraces This statement should have braces 3 190
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 190
LocalVariableCouldBeFinal Local variable 'that' could be declared final 3 191

org/apache/fulcrum/localization/SimpleLocalizationService.java

Rule Violation Priority Line
AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 3 132
UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 4 189

org/apache/fulcrum/localization/SimpleLocalizationServiceImpl.java

Rule Violation Priority Line
GodClass Possible God Class (WMC=61, ATFD=40, TCC=12.632%) 3 75–635
UnusedAssignment The field initializer for 'bundles' is never used (overwritten on line 116) 3 92
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 3 92
RedundantFieldInitializer Avoid using redundant field initializer for 'bundles' 3 92
LooseCoupling Avoid using implementation types like 'HashMap'; use the interface instead 3 92
RedundantFieldInitializer Avoid using redundant field initializer for 'bundleNames' 3 97
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 3 97
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 3 103
RedundantFieldInitializer Avoid using redundant field initializer for 'defaultLocale' 3 103
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 3 106
RedundantFieldInitializer Avoid using redundant field initializer for 'defaultLanguage' 3 106
BeanMembersShouldSerialize Found non-transient, non-static member. Please mark as transient or provide accessors. 3 109
RedundantFieldInitializer Avoid using redundant field initializer for 'defaultCountry' 3 109
CallSuperInConstructor It is a good practice to call super() in a constructor 3 114–117
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 116
MethodArgumentCouldBeFinal Parameter 'conf' is not assigned and could be declared final 3 128
LocalVariableCouldBeFinal Local variable 'jvmDefault' could be declared final 3 130
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 132–136
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 135
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 138–140
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 139
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 142–146
LocalVariableCouldBeFinal Local variable 'nameVal' could be declared final 3 150
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'bundleName' (lines '151'-'156'). 5 151–156
LocalVariableCouldBeFinal Local variable 'val' could be declared final 3 154
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 155
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'bundleName' (lines '156'-'156'). 5 156
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 171
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 173
MethodArgumentCouldBeFinal Parameter 'intBundleNames' is not assigned and could be declared final 3 182
UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 4 182
IfElseStmtsMustUseBraces Avoid using if...else statements without curly braces 3 185
ControlStatementBraces This statement should have braces 3 185
IfElseStmtsMustUseBraces Avoid using if...else statements without curly braces 3 187
ControlStatementBraces This statement should have braces 3 187
UselessParentheses Useless parentheses. 4 232
MethodArgumentCouldBeFinal Parameter 'bundleName' is not assigned and could be declared final 3 264
AvoidReassigningParameters Avoid reassigning parameters such as 'bundleName' 2 285
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 286
UselessParentheses Useless parentheses. 4 286
AvoidReassigningParameters Avoid reassigning parameters such as 'locale' 2 289
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'rb' (lines '292'-'298'). 5 292–298
UnusedAssignment The initializer for variable 'rb' is never used (overwritten on lines 298 and 307) 3 292
ShortVariable Avoid variables with short names like rb 3 292
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'rb' (lines '292'-'307'). 5 292–307
LocalVariableCouldBeFinal Local variable 'bundlesByLocale' could be declared final 3 293
ConfusingTernary Avoid if (x != y) ..; else ..; 3 294–308
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 324–363
MethodArgumentCouldBeFinal Parameter 'bundleName' is not assigned and could be declared final 3 325
MethodArgumentCouldBeFinal Parameter 'locale' is not assigned and could be declared final 3 326
AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 3 327
ShortVariable Avoid variables with short names like rb 3 330
UselessParentheses Useless parentheses. 4 331–333
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 333
UnnecessaryCast Avoid unnecessary casts 3 333
UselessParentheses Useless parentheses. 4 337–339
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'rb' (lines '342'-'346'). 5 342–346
LocalVariableCouldBeFinal Local variable 'bundlesByName' could be declared final 3 356–357
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 357
MethodArgumentCouldBeFinal Parameter 'bundleName' is not assigned and could be declared final 3 389
MethodArgumentCouldBeFinal Parameter 'locale' is not assigned and could be declared final 3 390
MethodArgumentCouldBeFinal Parameter 'bundlesByLocale' is not assigned and could be declared final 3 391
ShortVariable Avoid variables with short names like rb 3 393
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'rb' (lines '393'-'416'). 5 393–416
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'rb' (lines '393'-'404'). 5 393–404
LongVariable Avoid excessively long variable names like withDefaultCountry 3 402
LocalVariableCouldBeFinal Local variable 'withDefaultCountry' could be declared final 3 402–403
LongVariable Avoid excessively long variable names like withDefaultLanguage 3 414
LocalVariableCouldBeFinal Local variable 'withDefaultLanguage' could be declared final 3 414–415
UnnecessaryModifier Unnecessary modifier 'final' on method 'getBundleIgnoreException': private methods cannot be overridden 3 441–453
MethodArgumentCouldBeFinal Parameter 'bundleName' is not assigned and could be declared final 3 442
MethodArgumentCouldBeFinal Parameter 'locale' is not assigned and could be declared final 3 443
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 447
MethodArgumentCouldBeFinal Parameter 'defaultBundle' is not assigned and could be declared final 3 462
MethodArgumentCouldBeFinal Parameter 'key' is not assigned and could be declared final 3 486
MethodArgumentCouldBeFinal Parameter 'bundleName' is not assigned and could be declared final 3 486
AvoidUncheckedExceptionsInSignatures A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause 3 487
DataflowAnomalyAnalysis Found 'DD'-anomaly for variable 'value' (lines '489'-'496'). 5 489–496
UnusedAssignment The initializer for variable 'value' is never used (overwritten on line 496) 3 489
AvoidReassigningParameters Avoid reassigning parameters such as 'locale' 2 492
ShortVariable Avoid variables with short names like rb 3 495
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 501–516
LawOfDemeter Potential violation of Law of Demeter (object not created locally) 3 506
LocalVariableCouldBeFinal Local variable 'loc' could be declared final 3 520
LocalVariableCouldBeFinal Local variable 'mesg' could be declared final 3 521–529
LawOfDemeter Potential violation of Law of Demeter (method chain calls) 3 530
MethodArgumentCouldBeFinal Parameter 'key' is not assigned and could be declared final 3 544
ShortVariable Avoid variables with short names like rb 3 559
MethodArgumentCouldBeFinal Parameter 'rb' is not assigned and could be declared final 3 559
MethodArgumentCouldBeFinal Parameter 'key' is not assigned and could be declared final 3 559
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 565
MethodArgumentCouldBeFinal Parameter 'bundleName' is not assigned and could be declared final 3 584
MethodArgumentCouldBeFinal Parameter 'locale' is not assigned and could be declared final 3 585
MethodArgumentCouldBeFinal Parameter 'key' is not assigned and could be declared final 3 586
MethodArgumentCouldBeFinal Parameter 'arg1' is not assigned and could be declared final 3 587
MethodArgumentCouldBeFinal Parameter 'bundleName' is not assigned and could be declared final 3 597
MethodArgumentCouldBeFinal Parameter 'locale' is not assigned and could be declared final 3 598
MethodArgumentCouldBeFinal Parameter 'key' is not assigned and could be declared final 3 599
MethodArgumentCouldBeFinal Parameter 'arg1' is not assigned and could be declared final 3 600
MethodArgumentCouldBeFinal Parameter 'arg2' is not assigned and could be declared final 3 601
MethodArgumentCouldBeFinal Parameter 'bundleName' is not assigned and could be declared final 3 620
MethodArgumentCouldBeFinal Parameter 'locale' is not assigned and could be declared final 3 621
MethodArgumentCouldBeFinal Parameter 'key' is not assigned and could be declared final 3 622
MethodArgumentCouldBeFinal Parameter 'args' is not assigned and could be declared final 3 623
LocalVariableCouldBeFinal Local variable 'formatLocale' could be declared final 3 627
LocalVariableCouldBeFinal Local variable 'value' could be declared final 3 628
LocalVariableCouldBeFinal Local variable 'formatArgs' could be declared final 3 630
LocalVariableCouldBeFinal Local variable 'messageFormat' could be declared final 3 632