PMD Results
The following document contains the results of PMD 6.38.0.
Violations By Priority
Priority 3
org/apache/fulcrum/crypto/CryptoAlgorithm.java
Rule | Violation | Line |
---|---|---|
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 63 |
org/apache/fulcrum/crypto/CryptoService.java
Rule | Violation | Line |
---|---|---|
UnnecessaryModifier | Unnecessary modifier 'public' on method 'getCryptoAlgorithm': the method is declared in an interface type | 46 |
org/apache/fulcrum/crypto/DefaultCryptoService.java
Rule | Violation | Line |
---|---|---|
AtLeastOneConstructor | Each class should declare at least one constructor | 45–140 |
LooseCoupling | Avoid using implementation types like 'HashMap'; use the interface instead | 59 |
BeanMembersShouldSerialize | Found non-transient, non-static member. Please mark as transient or provide accessors. | 59 |
MissingOverride | The method 'getCryptoAlgorithm(String)' is missing an @Override annotation. | 74–92 |
MethodArgumentCouldBeFinal | Parameter 'algo' is not assigned and could be declared final | 74 |
UnnecessaryCast | Avoid unnecessary casts | 76 |
ShortVariable | Avoid variables with short names like ca | 77 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 77 |
UnusedAssignment | The initializer for variable 'ca' is never used (overwritten on line 85) | 77 |
UnnecessaryCast | Avoid unnecessary casts | 79 |
LawOfDemeter | Potential violation of Law of Demeter (object not created locally) | 81 |
LawOfDemeter | Potential violation of Law of Demeter (method chain calls) | 85 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 86 |
PreserveStackTrace | New exception is thrown in catch block, original stack trace may be lost | 87–88 |
LawOfDemeter | Potential violation of Law of Demeter (object not created locally) | 90 |
MethodArgumentCouldBeFinal | Parameter 'conf' is not assigned and could be declared final | 103 |
MissingOverride | The method 'configure(Configuration)' is missing an @Override annotation. | 103–118 |
LocalVariableCouldBeFinal | Local variable 'nameVal' could be declared final | 112 |
LocalVariableCouldBeFinal | Local variable 'entry' could be declared final | 113 |
MissingOverride | The method 'initialize()' is missing an @Override annotation. | 127–130 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 127 |
LawOfDemeter | Potential violation of Law of Demeter (method chain calls) | 129 |
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 137 |
org/apache/fulcrum/crypto/provider/ClearCrypt.java
Rule | Violation | Line |
---|---|---|
UnnecessaryConstructor | Avoid unnecessary constructors - the compiler will generate these for you | 39–41 |
MethodArgumentCouldBeFinal | Parameter 'cipher' is not assigned and could be declared final | 48 |
MissingOverride | The method 'setCipher(String)' is missing an @Override annotation. | 48–50 |
MethodArgumentCouldBeFinal | Parameter 'seed' is not assigned and could be declared final | 57 |
MissingOverride | The method 'setSeed(String)' is missing an @Override annotation. | 57–59 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 69 |
MissingOverride | The method 'encrypt(String)' is missing an @Override annotation. | 69–72 |
MethodArgumentCouldBeFinal | Parameter 'value' is not assigned and could be declared final | 69 |
org/apache/fulcrum/crypto/provider/JavaCrypt.java
Rule | Violation | Line |
---|---|---|
UnusedAssignment | The field initializer for 'cipher' is never used (overwritten on line 59) | 51 |
RedundantFieldInitializer | Avoid using redundant field initializer for 'cipher' | 51 |
BeanMembersShouldSerialize | Found non-transient, non-static member. Please mark as transient or provide accessors. | 51 |
MethodArgumentCouldBeFinal | Parameter 'cipher' is not assigned and could be declared final | 74 |
MissingOverride | The method 'setCipher(String)' is missing an @Override annotation. | 74–77 |
MissingOverride | The method 'setSeed(String)' is missing an @Override annotation. | 87–90 |
MethodArgumentCouldBeFinal | Parameter 'seed' is not assigned and could be declared final | 87 |
MissingOverride | The method 'encrypt(String)' is missing an @Override annotation. | 101–112 |
MethodArgumentCouldBeFinal | Parameter 'value' is not assigned and could be declared final | 101 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 101 |
ShortVariable | Avoid variables with short names like md | 103 |
LocalVariableCouldBeFinal | Local variable 'md' could be declared final | 103 |
LawOfDemeter | Potential violation of Law of Demeter (object not created locally) | 107 |
LocalVariableCouldBeFinal | Local variable 'digest' could be declared final | 107 |
LocalVariableCouldBeFinal | Local variable 'encodedDigest' could be declared final | 110 |
org/apache/fulcrum/crypto/provider/OldJavaCrypt.java
Rule | Violation | Line |
---|---|---|
BeanMembersShouldSerialize | Found non-transient, non-static member. Please mark as transient or provide accessors. | 50 |
UnusedAssignment | The field initializer for 'cipher' is never used (overwritten on line 57) | 50 |
RedundantFieldInitializer | Avoid using redundant field initializer for 'cipher' | 50 |
MissingOverride | The method 'setCipher(String)' is missing an @Override annotation. | 70–73 |
MethodArgumentCouldBeFinal | Parameter 'cipher' is not assigned and could be declared final | 70 |
MethodArgumentCouldBeFinal | Parameter 'seed' is not assigned and could be declared final | 81 |
MissingOverride | The method 'setSeed(String)' is missing an @Override annotation. | 81–84 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 93 |
MissingOverride | The method 'encrypt(String)' is missing an @Override annotation. | 93–106 |
MethodArgumentCouldBeFinal | Parameter 'value' is not assigned and could be declared final | 93 |
ShortVariable | Avoid variables with short names like md | 95 |
LocalVariableCouldBeFinal | Local variable 'md' could be declared final | 95 |
LawOfDemeter | Potential violation of Law of Demeter (object not created locally) | 96 |
LocalVariableCouldBeFinal | Local variable 'digest' could be declared final | 96 |
LocalVariableCouldBeFinal | Local variable 'base64' could be declared final | 97 |
LocalVariableCouldBeFinal | Local variable 'len' could be declared final | 101 |
LocalVariableCouldBeFinal | Local variable 'result' could be declared final | 102 |
org/apache/fulcrum/crypto/provider/UnixCrypt.java
Rule | Violation | Line |
---|---|---|
RedundantFieldInitializer | Avoid using redundant field initializer for 'seed' | 36 |
BeanMembersShouldSerialize | Found non-transient, non-static member. Please mark as transient or provide accessors. | 36 |
UnnecessaryConstructor | Avoid unnecessary constructors - the compiler will generate these for you | 45–47 |
MethodArgumentCouldBeFinal | Parameter 'cipher' is not assigned and could be declared final | 55 |
MissingOverride | The method 'setCipher(String)' is missing an @Override annotation. | 55–58 |
MissingOverride | The method 'setSeed(String)' is missing an @Override annotation. | 66–69 |
MethodArgumentCouldBeFinal | Parameter 'seed' is not assigned and could be declared final | 66 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 78 |
MissingOverride | The method 'encrypt(String)' is missing an @Override annotation. | 78–92 |
MethodArgumentCouldBeFinal | Parameter 'value' is not assigned and could be declared final | 78 |
LocalVariableCouldBeFinal | Local variable 'randomGenerator' could be declared final | 82 |
LocalVariableCouldBeFinal | Local variable 'numSaltChars' could be declared final | 83 |
ShortVariable | Avoid variables with short names like sb | 84 |
LocalVariableCouldBeFinal | Local variable 'sb' could be declared final | 84 |
LawOfDemeter | Potential violation of Law of Demeter (static property access) | 91 |
Priority 4
org/apache/fulcrum/crypto/provider/JavaCrypt.java
Rule | Violation | Line |
---|---|---|
UselessParentheses | Useless parentheses. | 111 |
org/apache/fulcrum/crypto/provider/OldJavaCrypt.java
Rule | Violation | Line |
---|---|---|
UselessParentheses | Useless parentheses. | 101 |
Priority 5
org/apache/fulcrum/crypto/DefaultCryptoService.java
Rule | Violation | Line |
---|---|---|
DataflowAnomalyAnalysis | Found 'DD'-anomaly for variable 'ca' (lines '77'-'85'). | 77–85 |
DataflowAnomalyAnalysis | Found 'DU'-anomaly for variable 'ca' (lines '77'-'92'). | 77–92 |
DataflowAnomalyAnalysis | Found 'DU'-anomaly for variable 'ca' (lines '85'-'92'). | 85–92 |
Files
org/apache/fulcrum/crypto/CryptoAlgorithm.java
Rule | Violation | Priority | Line |
---|---|---|---|
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 63 |
org/apache/fulcrum/crypto/CryptoService.java
Rule | Violation | Priority | Line |
---|---|---|---|
UnnecessaryModifier | Unnecessary modifier 'public' on method 'getCryptoAlgorithm': the method is declared in an interface type | 3 | 46 |
org/apache/fulcrum/crypto/DefaultCryptoService.java
Rule | Violation | Priority | Line |
---|---|---|---|
AtLeastOneConstructor | Each class should declare at least one constructor | 3 | 45–140 |
LooseCoupling | Avoid using implementation types like 'HashMap'; use the interface instead | 3 | 59 |
BeanMembersShouldSerialize | Found non-transient, non-static member. Please mark as transient or provide accessors. | 3 | 59 |
MissingOverride | The method 'getCryptoAlgorithm(String)' is missing an @Override annotation. | 3 | 74–92 |
MethodArgumentCouldBeFinal | Parameter 'algo' is not assigned and could be declared final | 3 | 74 |
UnnecessaryCast | Avoid unnecessary casts | 3 | 76 |
ShortVariable | Avoid variables with short names like ca | 3 | 77 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 77 |
DataflowAnomalyAnalysis | Found 'DD'-anomaly for variable 'ca' (lines '77'-'85'). | 5 | 77–85 |
UnusedAssignment | The initializer for variable 'ca' is never used (overwritten on line 85) | 3 | 77 |
DataflowAnomalyAnalysis | Found 'DU'-anomaly for variable 'ca' (lines '77'-'92'). | 5 | 77–92 |
UnnecessaryCast | Avoid unnecessary casts | 3 | 79 |
LawOfDemeter | Potential violation of Law of Demeter (object not created locally) | 3 | 81 |
LawOfDemeter | Potential violation of Law of Demeter (method chain calls) | 3 | 85 |
DataflowAnomalyAnalysis | Found 'DU'-anomaly for variable 'ca' (lines '85'-'92'). | 5 | 85–92 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 86 |
PreserveStackTrace | New exception is thrown in catch block, original stack trace may be lost | 3 | 87–88 |
LawOfDemeter | Potential violation of Law of Demeter (object not created locally) | 3 | 90 |
MethodArgumentCouldBeFinal | Parameter 'conf' is not assigned and could be declared final | 3 | 103 |
MissingOverride | The method 'configure(Configuration)' is missing an @Override annotation. | 3 | 103–118 |
LocalVariableCouldBeFinal | Local variable 'nameVal' could be declared final | 3 | 112 |
LocalVariableCouldBeFinal | Local variable 'entry' could be declared final | 3 | 113 |
MissingOverride | The method 'initialize()' is missing an @Override annotation. | 3 | 127–130 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 127 |
LawOfDemeter | Potential violation of Law of Demeter (method chain calls) | 3 | 129 |
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 3 | 137 |
org/apache/fulcrum/crypto/provider/ClearCrypt.java
Rule | Violation | Priority | Line |
---|---|---|---|
UnnecessaryConstructor | Avoid unnecessary constructors - the compiler will generate these for you | 3 | 39–41 |
MethodArgumentCouldBeFinal | Parameter 'cipher' is not assigned and could be declared final | 3 | 48 |
MissingOverride | The method 'setCipher(String)' is missing an @Override annotation. | 3 | 48–50 |
MethodArgumentCouldBeFinal | Parameter 'seed' is not assigned and could be declared final | 3 | 57 |
MissingOverride | The method 'setSeed(String)' is missing an @Override annotation. | 3 | 57–59 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 69 |
MissingOverride | The method 'encrypt(String)' is missing an @Override annotation. | 3 | 69–72 |
MethodArgumentCouldBeFinal | Parameter 'value' is not assigned and could be declared final | 3 | 69 |
org/apache/fulcrum/crypto/provider/JavaCrypt.java
Rule | Violation | Priority | Line |
---|---|---|---|
UnusedAssignment | The field initializer for 'cipher' is never used (overwritten on line 59) | 3 | 51 |
RedundantFieldInitializer | Avoid using redundant field initializer for 'cipher' | 3 | 51 |
BeanMembersShouldSerialize | Found non-transient, non-static member. Please mark as transient or provide accessors. | 3 | 51 |
MethodArgumentCouldBeFinal | Parameter 'cipher' is not assigned and could be declared final | 3 | 74 |
MissingOverride | The method 'setCipher(String)' is missing an @Override annotation. | 3 | 74–77 |
MissingOverride | The method 'setSeed(String)' is missing an @Override annotation. | 3 | 87–90 |
MethodArgumentCouldBeFinal | Parameter 'seed' is not assigned and could be declared final | 3 | 87 |
MissingOverride | The method 'encrypt(String)' is missing an @Override annotation. | 3 | 101–112 |
MethodArgumentCouldBeFinal | Parameter 'value' is not assigned and could be declared final | 3 | 101 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 101 |
ShortVariable | Avoid variables with short names like md | 3 | 103 |
LocalVariableCouldBeFinal | Local variable 'md' could be declared final | 3 | 103 |
LawOfDemeter | Potential violation of Law of Demeter (object not created locally) | 3 | 107 |
LocalVariableCouldBeFinal | Local variable 'digest' could be declared final | 3 | 107 |
LocalVariableCouldBeFinal | Local variable 'encodedDigest' could be declared final | 3 | 110 |
UselessParentheses | Useless parentheses. | 4 | 111 |
org/apache/fulcrum/crypto/provider/OldJavaCrypt.java
Rule | Violation | Priority | Line |
---|---|---|---|
BeanMembersShouldSerialize | Found non-transient, non-static member. Please mark as transient or provide accessors. | 3 | 50 |
UnusedAssignment | The field initializer for 'cipher' is never used (overwritten on line 57) | 3 | 50 |
RedundantFieldInitializer | Avoid using redundant field initializer for 'cipher' | 3 | 50 |
MissingOverride | The method 'setCipher(String)' is missing an @Override annotation. | 3 | 70–73 |
MethodArgumentCouldBeFinal | Parameter 'cipher' is not assigned and could be declared final | 3 | 70 |
MethodArgumentCouldBeFinal | Parameter 'seed' is not assigned and could be declared final | 3 | 81 |
MissingOverride | The method 'setSeed(String)' is missing an @Override annotation. | 3 | 81–84 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 93 |
MissingOverride | The method 'encrypt(String)' is missing an @Override annotation. | 3 | 93–106 |
MethodArgumentCouldBeFinal | Parameter 'value' is not assigned and could be declared final | 3 | 93 |
ShortVariable | Avoid variables with short names like md | 3 | 95 |
LocalVariableCouldBeFinal | Local variable 'md' could be declared final | 3 | 95 |
LawOfDemeter | Potential violation of Law of Demeter (object not created locally) | 3 | 96 |
LocalVariableCouldBeFinal | Local variable 'digest' could be declared final | 3 | 96 |
LocalVariableCouldBeFinal | Local variable 'base64' could be declared final | 3 | 97 |
UselessParentheses | Useless parentheses. | 4 | 101 |
LocalVariableCouldBeFinal | Local variable 'len' could be declared final | 3 | 101 |
LocalVariableCouldBeFinal | Local variable 'result' could be declared final | 3 | 102 |
org/apache/fulcrum/crypto/provider/UnixCrypt.java
Rule | Violation | Priority | Line |
---|---|---|---|
RedundantFieldInitializer | Avoid using redundant field initializer for 'seed' | 3 | 36 |
BeanMembersShouldSerialize | Found non-transient, non-static member. Please mark as transient or provide accessors. | 3 | 36 |
UnnecessaryConstructor | Avoid unnecessary constructors - the compiler will generate these for you | 3 | 45–47 |
MethodArgumentCouldBeFinal | Parameter 'cipher' is not assigned and could be declared final | 3 | 55 |
MissingOverride | The method 'setCipher(String)' is missing an @Override annotation. | 3 | 55–58 |
MissingOverride | The method 'setSeed(String)' is missing an @Override annotation. | 3 | 66–69 |
MethodArgumentCouldBeFinal | Parameter 'seed' is not assigned and could be declared final | 3 | 66 |
SignatureDeclareThrowsException | A method/constructor should not explicitly throw java.lang.Exception | 3 | 78 |
MissingOverride | The method 'encrypt(String)' is missing an @Override annotation. | 3 | 78–92 |
MethodArgumentCouldBeFinal | Parameter 'value' is not assigned and could be declared final | 3 | 78 |
LocalVariableCouldBeFinal | Local variable 'randomGenerator' could be declared final | 3 | 82 |
LocalVariableCouldBeFinal | Local variable 'numSaltChars' could be declared final | 3 | 83 |
ShortVariable | Avoid variables with short names like sb | 3 | 84 |
LocalVariableCouldBeFinal | Local variable 'sb' could be declared final | 3 | 84 |
LawOfDemeter | Potential violation of Law of Demeter (static property access) | 3 | 91 |