Le document suivant contient les résultats de PMD 6.13.0.
Rule | Violation | Ligne |
---|---|---|
ClassWithOnlyPrivateConstructorsShouldBeFinal | A class which only has private constructors should be final | 52–202 |
Rule | Violation | Ligne |
---|---|---|
FieldNamingConventions | The enum constant name 'disabled' doesn't match '[A-Z][A-Z_0-9]*' | 45 |
FieldNamingConventions | The enum constant name 'enabled' doesn't match '[A-Z][A-Z_0-9]*' | 46 |
FieldNamingConventions | The enum constant name 'conditioned' doesn't match '[A-Z][A-Z_0-9]*' | 47 |
Rule | Violation | Ligne |
---|---|---|
ClassWithOnlyPrivateConstructorsShouldBeFinal | A class which only has private constructors should be final | 46–134 |
Rule | Violation | Ligne |
---|---|---|
UncommentedEmptyConstructor | Document empty constructor | 68–70 |
UnnecessaryConstructor | Avoid unnecessary constructors - the compiler will generate these for you | 68–70 |
NonThreadSafeSingleton | Singleton is not thread safe | 78–82 |
MissingOverride | The method 'getWorkgroup()' is missing an @Override annotation. | 220–223 |
Rule | Violation | Ligne |
---|---|---|
MissingOverride | The method 'insert(HtmlPage, Plugin)' is missing an @Override annotation. | 100–116 |
MissingOverride | The method 'load(int, Plugin)' is missing an @Override annotation. | 127–151 |
MissingOverride | The method 'delete(HtmlPage, Plugin)' is missing an @Override annotation. | 161–168 |
MissingOverride | The method 'store(HtmlPage, Plugin)' is missing an @Override annotation. | 178–196 |
MissingOverride | The method 'selectAll(Plugin)' is missing an @Override annotation. | 205–229 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 207 |
MissingOverride | The method 'selectEnabledHtmlPage(int, Plugin)' is missing an @Override annotation. | 240–264 |
MissingOverride | The method 'selectEnabledHtmlPageList(Plugin)' is missing an @Override annotation. | 273–296 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 275 |
Rule | Violation | Ligne |
---|---|---|
UnnecessaryModifier | Unnecessary modifier 'private' on constructor 'EnumStatus(int, String)': enum constructors are implicitly private | 57–61 |
Rule | Violation | Ligne |
---|---|---|
MissingOverride | The method 'init()' is missing an @Override annotation. | 60–63 |
CommentRequired | Public method and constructor comments are required | 65–68 |
Rule | Violation | Ligne |
---|---|---|
NonThreadSafeSingleton | Singleton is not thread safe | 67–70 |
Rule | Violation | Ligne |
---|---|---|
UncommentedEmptyConstructor | Document empty constructor | 87–89 |
UnnecessaryConstructor | Avoid unnecessary constructors - the compiler will generate these for you | 87–89 |
MissingOverride | The method 'canBeRemoved(String)' is missing an @Override annotation. | 98–117 |
MissingOverride | The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. | 128–132 |
Rule | Violation | Ligne |
---|---|---|
UnnecessaryModifier | Unnecessary modifier 'public' on method 'getHtmlPageCache': the method is declared in an interface type | 19 |
UnnecessaryModifier | Unnecessary modifier 'public' on method 'getEnableHtmlPage': the method is declared in an interface type | 26 |
UnnecessaryModifier | Unnecessary modifier 'public' on method 'getHtmlPageListCache': the method is declared in an interface type | 32 |
UnnecessaryModifier | Unnecessary modifier 'public' on method 'getEnabledHtmlPageList': the method is declared in an interface type | 38 |
Rule | Violation | Ligne |
---|---|---|
CallSuperInConstructor | It is a good practice to call super() in a constructor | 54–57 |
NonThreadSafeSingleton | Singleton is not thread safe | 66–69 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 131 |
Rule | Violation | Ligne |
---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 34–307 |
MissingOverride | The method 'getDescription()' is missing an @Override annotation. | 93–96 |
MissingOverride | The method 'indexDocuments()' is missing an @Override annotation. | 108–124 |
MissingOverride | The method 'getDocuments(String)' is missing an @Override annotation. | 133–162 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 135 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 151 |
MissingOverride | The method 'getName()' is missing an @Override annotation. | 167–170 |
MissingOverride | The method 'getVersion()' is missing an @Override annotation. | 175–178 |
MissingOverride | The method 'isEnable()' is missing an @Override annotation. | 183–195 |
UnusedFormalParameter | Avoid unused method parameters such as 'plugin'. | 215 |
ShortVariable | Avoid variables with short names like ft | 217 |
PreserveStackTrace | New exception is thrown in catch block, original stack trace may be lost | 245 |
IdenticalCatchBranches | 'catch' branch identical to 'SAXException' branch | 247–250 |
PreserveStackTrace | New exception is thrown in catch block, original stack trace may be lost | 249 |
ShortVariable | Avoid variables with short names like sb | 254 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 280 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 282 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 282 |
MissingOverride | The method 'getListType()' is missing an @Override annotation. | 292–298 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 294 |
MissingOverride | The method 'getSpecificSearchAppUrl()' is missing an @Override annotation. | 303–306 |
Rule | Violation | Ligne |
---|---|---|
MissingOverride | The method 'getSearchResults(String, HttpServletRequest)' is missing an @Override annotation. | 80–120 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 82 |
ShortVariable | Avoid variables with short names like ir | 85 |
ForLoopCanBeForeach | This for loop can be replaced by a foreach loop | 106–112 |
ShortVariable | Avoid variables with short names like si | 110 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 114 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 131 |
Rule | Violation | Ligne |
---|---|---|
UseUtilityClass | All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. | 46–78 |
Rule | Violation | Ligne |
---|---|---|
UseUtilityClass | All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. | 54–133 |
SimpleDateFormatNeedsLocale | When instantiating a SimpleDateFormat object, specify a Locale | 122 |
Rule | Violation | Ligne |
---|---|---|
UncommentedEmptyConstructor | Document empty constructor | 103–105 |
UnnecessaryConstructor | Avoid unnecessary constructors - the compiler will generate these for you | 103–105 |
MissingOverride | The method 'getPage(HttpServletRequest, int, Plugin)' is missing an @Override annotation. | 120–151 |
UnusedFormalParameter | Avoid unused method parameters such as 'strPluginName'. | 153 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 158 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 168 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 171 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 199 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 204–219 |
Rule | Violation | Ligne |
---|---|---|
MissingOverride | The method 'fillTemplate(Map, PageData, int, HttpServletRequest)' is missing an @Override annotation. | 74–86 |
Rule | Violation | Ligne |
---|---|---|
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 68–381 |
SingularField | Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. | 122 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 147 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 147 |
AddEmptyString | Do not add empty strings | 148 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 168 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 168 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 193 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 194 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 195 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 196 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 216 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 278 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 278 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 321 |
Rule | Violation | Ligne |
---|---|---|
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.plugins.htmlpage.business.HtmlPageHome' | 37 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' | 121 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' | 135 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' | 146 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' | 225 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' | 225 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
UncommentedEmptyConstructor | Document empty constructor | 3 | 68–70 |
UnnecessaryConstructor | Avoid unnecessary constructors - the compiler will generate these for you | 3 | 68–70 |
NonThreadSafeSingleton | Singleton is not thread safe | 3 | 78–82 |
MissingOverride | The method 'getWorkgroup()' is missing an @Override annotation. | 3 | 220–223 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
MissingOverride | The method 'insert(HtmlPage, Plugin)' is missing an @Override annotation. | 3 | 100–116 |
MissingOverride | The method 'load(int, Plugin)' is missing an @Override annotation. | 3 | 127–151 |
MissingOverride | The method 'delete(HtmlPage, Plugin)' is missing an @Override annotation. | 3 | 161–168 |
MissingOverride | The method 'store(HtmlPage, Plugin)' is missing an @Override annotation. | 3 | 178–196 |
MissingOverride | The method 'selectAll(Plugin)' is missing an @Override annotation. | 3 | 205–229 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 207 |
MissingOverride | The method 'selectEnabledHtmlPage(int, Plugin)' is missing an @Override annotation. | 3 | 240–264 |
MissingOverride | The method 'selectEnabledHtmlPageList(Plugin)' is missing an @Override annotation. | 3 | 273–296 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 275 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
ClassWithOnlyPrivateConstructorsShouldBeFinal | A class which only has private constructors should be final | 1 | 52–202 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
FieldNamingConventions | The enum constant name 'disabled' doesn't match '[A-Z][A-Z_0-9]*' | 1 | 45 |
FieldNamingConventions | The enum constant name 'enabled' doesn't match '[A-Z][A-Z_0-9]*' | 1 | 46 |
FieldNamingConventions | The enum constant name 'conditioned' doesn't match '[A-Z][A-Z_0-9]*' | 1 | 47 |
UnnecessaryModifier | Unnecessary modifier 'private' on constructor 'EnumStatus(int, String)': enum constructors are implicitly private | 3 | 57–61 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
MissingOverride | The method 'init()' is missing an @Override annotation. | 3 | 60–63 |
CommentRequired | Public method and constructor comments are required | 3 | 65–68 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
NonThreadSafeSingleton | Singleton is not thread safe | 3 | 67–70 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
UncommentedEmptyConstructor | Document empty constructor | 3 | 87–89 |
UnnecessaryConstructor | Avoid unnecessary constructors - the compiler will generate these for you | 3 | 87–89 |
MissingOverride | The method 'canBeRemoved(String)' is missing an @Override annotation. | 3 | 98–117 |
MissingOverride | The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. | 3 | 128–132 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
UnnecessaryModifier | Unnecessary modifier 'public' on method 'getHtmlPageCache': the method is declared in an interface type | 3 | 19 |
UnnecessaryModifier | Unnecessary modifier 'public' on method 'getEnableHtmlPage': the method is declared in an interface type | 3 | 26 |
UnnecessaryModifier | Unnecessary modifier 'public' on method 'getHtmlPageListCache': the method is declared in an interface type | 3 | 32 |
UnnecessaryModifier | Unnecessary modifier 'public' on method 'getEnabledHtmlPageList': the method is declared in an interface type | 3 | 38 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
ClassWithOnlyPrivateConstructorsShouldBeFinal | A class which only has private constructors should be final | 1 | 46–134 |
CallSuperInConstructor | It is a good practice to call super() in a constructor | 3 | 54–57 |
NonThreadSafeSingleton | Singleton is not thread safe | 3 | 66–69 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 3 | 131 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 3 | 34–307 |
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.plugins.htmlpage.business.HtmlPageHome' | 4 | 37 |
MissingOverride | The method 'getDescription()' is missing an @Override annotation. | 3 | 93–96 |
MissingOverride | The method 'indexDocuments()' is missing an @Override annotation. | 3 | 108–124 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' | 4 | 121 |
MissingOverride | The method 'getDocuments(String)' is missing an @Override annotation. | 3 | 133–162 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 135 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' | 4 | 135 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' | 4 | 146 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 151 |
MissingOverride | The method 'getName()' is missing an @Override annotation. | 3 | 167–170 |
MissingOverride | The method 'getVersion()' is missing an @Override annotation. | 3 | 175–178 |
MissingOverride | The method 'isEnable()' is missing an @Override annotation. | 3 | 183–195 |
UnusedFormalParameter | Avoid unused method parameters such as 'plugin'. | 3 | 215 |
ShortVariable | Avoid variables with short names like ft | 3 | 217 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' | 4 | 225 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' | 4 | 225 |
PreserveStackTrace | New exception is thrown in catch block, original stack trace may be lost | 3 | 245 |
IdenticalCatchBranches | 'catch' branch identical to 'SAXException' branch | 3 | 247–250 |
PreserveStackTrace | New exception is thrown in catch block, original stack trace may be lost | 3 | 249 |
ShortVariable | Avoid variables with short names like sb | 3 | 254 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 3 | 280 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 3 | 282 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 3 | 282 |
MissingOverride | The method 'getListType()' is missing an @Override annotation. | 3 | 292–298 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 294 |
MissingOverride | The method 'getSpecificSearchAppUrl()' is missing an @Override annotation. | 3 | 303–306 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
MissingOverride | The method 'getSearchResults(String, HttpServletRequest)' is missing an @Override annotation. | 3 | 80–120 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 82 |
ShortVariable | Avoid variables with short names like ir | 3 | 85 |
ForLoopCanBeForeach | This for loop can be replaced by a foreach loop | 3 | 106–112 |
ShortVariable | Avoid variables with short names like si | 3 | 110 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 114 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 131 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
UseUtilityClass | All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. | 3 | 46–78 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
UseUtilityClass | All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. | 3 | 54–133 |
SimpleDateFormatNeedsLocale | When instantiating a SimpleDateFormat object, specify a Locale | 3 | 122 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
UncommentedEmptyConstructor | Document empty constructor | 3 | 103–105 |
UnnecessaryConstructor | Avoid unnecessary constructors - the compiler will generate these for you | 3 | 103–105 |
MissingOverride | The method 'getPage(HttpServletRequest, int, Plugin)' is missing an @Override annotation. | 3 | 120–151 |
UnusedFormalParameter | Avoid unused method parameters such as 'strPluginName'. | 3 | 153 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 158 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 168 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 171 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 199 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 204–219 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
MissingOverride | The method 'fillTemplate(Map, PageData, int, HttpServletRequest)' is missing an @Override annotation. | 3 | 74–86 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 3 | 68–381 |
SingularField | Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. | 3 | 122 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 147 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 147 |
AddEmptyString | Do not add empty strings | 3 | 148 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 168 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 168 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 193 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 194 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 195 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 196 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 216 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 278 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 278 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 321 |