PMD Results
The following document contains the results of PMD 7.17.0.
Violations By Priority
Priority 1
civitas.externalcrypto - civitas/crypto/messagedigest/TestUtil.java
Priority 3
civitas.externalcrypto - civitas/crypto/CryptoBase.java
| Rule |
Violation |
Line |
| ServiceClassField |
Services have only @Autowired fields |
24 |
| ServiceClassField |
Services have only @Autowired fields |
25 |
| ServiceClassField |
Services have only @Autowired fields |
26 |
| AvoidFieldNameMatchingMethodName |
Field getPublicKeyGenerator has the same name as a method |
29 |
| AvoidFieldNameMatchingMethodName |
Field getSharedKeyGenerator has the same name as a method |
32 |
| AvoidCatchingGenericException |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block |
41 |
| ServiceClassMethods |
Services have only public apply method |
46 |
| ServiceClassMethods |
Services have only public apply method |
50 |
| ServiceClassMethods |
Services have only public apply method |
58 |
| ServiceClassMethods |
Services have only public apply method |
62 |
| AvoidCatchingGenericException |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block |
69 |
| ServiceClassMethods |
Services have only public apply method |
74 |
| ServiceClassMethods |
Services have only public apply method |
78 |
| ServiceClassMethods |
Services have only public apply method |
82 |
civitas.externalcrypto - civitas/crypto/GetPublicKeyGeneratorService.java
| Rule |
Violation |
Line |
| UseConcurrentHashMap |
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation |
11 |
| ServiceClassField |
Services have only @Autowired fields |
11 |
| AvoidCatchingGenericException |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block |
24 |
civitas.externalcrypto - civitas/crypto/GetSharedKeyGeneratorService.java
| Rule |
Violation |
Line |
| UseConcurrentHashMap |
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation |
14 |
| ServiceClassField |
Services have only @Autowired fields |
14 |
civitas.externalcrypto - civitas/crypto/messagedigest/CryptoHash.java
| Rule |
Violation |
Line |
| AvoidMessageDigestField |
You shouldnt declare field of MessageDigest type, because unsynchronized access could cause problems |
21 |
| ServiceClassField |
Services have only @Autowired fields |
21 |
civitas.externalcrypto - civitas/common/ballotdesign/BallotDesignTestData.java
civitas.externalcrypto - civitas/crypto/CryptoBaseTest.java
civitas.externalcrypto - civitas/crypto/CryptoHashFunctionalTest.java
civitas.externalcrypto - civitas/crypto/messagedigest/MessageDigestTestData.java
| Rule |
Violation |
Line |
| AvoidMessageDigestField |
You shouldnt declare field of MessageDigest type, because unsynchronized access could cause problems |
6 |
civitas.externalcrypto - civitas/crypto/messagedigest/TestUtil.java
| Rule |
Violation |
Line |
| PreserveStackTrace |
Thrown exception does not preserve the stack trace of exception 'e' on all code paths |
11 |
Files
civitas.externalcrypto - civitas/crypto/CryptoBase.java
| Rule |
Violation |
Priority |
Line |
| ServiceClassField |
Services have only @Autowired fields |
3 |
24 |
| ServiceClassField |
Services have only @Autowired fields |
3 |
25 |
| ServiceClassField |
Services have only @Autowired fields |
3 |
26 |
| AvoidFieldNameMatchingMethodName |
Field getPublicKeyGenerator has the same name as a method |
3 |
29 |
| AvoidFieldNameMatchingMethodName |
Field getSharedKeyGenerator has the same name as a method |
3 |
32 |
| AvoidCatchingGenericException |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block |
3 |
41 |
| ServiceClassMethods |
Services have only public apply method |
3 |
46 |
| ServiceClassMethods |
Services have only public apply method |
3 |
50 |
| ServiceClassMethods |
Services have only public apply method |
3 |
58 |
| ServiceClassMethods |
Services have only public apply method |
3 |
62 |
| AvoidCatchingGenericException |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block |
3 |
69 |
| ServiceClassMethods |
Services have only public apply method |
3 |
74 |
| ServiceClassMethods |
Services have only public apply method |
3 |
78 |
| ServiceClassMethods |
Services have only public apply method |
3 |
82 |
civitas.externalcrypto - civitas/crypto/GetPublicKeyGeneratorService.java
| Rule |
Violation |
Priority |
Line |
| UseConcurrentHashMap |
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation |
3 |
11 |
| ServiceClassField |
Services have only @Autowired fields |
3 |
11 |
| AvoidCatchingGenericException |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block |
3 |
24 |
civitas.externalcrypto - civitas/crypto/GetSharedKeyGeneratorService.java
| Rule |
Violation |
Priority |
Line |
| UseConcurrentHashMap |
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation |
3 |
14 |
| ServiceClassField |
Services have only @Autowired fields |
3 |
14 |
civitas.externalcrypto - civitas/crypto/messagedigest/CryptoHash.java
| Rule |
Violation |
Priority |
Line |
| AvoidMessageDigestField |
You shouldnt declare field of MessageDigest type, because unsynchronized access could cause problems |
3 |
21 |
| ServiceClassField |
Services have only @Autowired fields |
3 |
21 |
civitas.externalcrypto - civitas/common/ballotdesign/BallotDesignTestData.java
civitas.externalcrypto - civitas/crypto/CryptoBaseTest.java
civitas.externalcrypto - civitas/crypto/CryptoHashFunctionalTest.java
civitas.externalcrypto - civitas/crypto/messagedigest/MessageDigestTestData.java
| Rule |
Violation |
Priority |
Line |
| AvoidMessageDigestField |
You shouldnt declare field of MessageDigest type, because unsynchronized access could cause problems |
3 |
6 |
civitas.externalcrypto - civitas/crypto/messagedigest/TestUtil.java
Processing Errors
| Filename |
Problem |
| civitas.externalcrypto - civitas/crypto/CryptoBaseTest.java |
ContextedRuntimeException: java.lang.NullPointerException: Cannot invoke "net.sourceforge.pmd.lang.java.ast.ASTVariableId.getInitializer()" because "varDecl" is null Exception Context: [1:Rule applied on node=!debug only! [ConstructorCall:82:28]new SecretKeySpec(SOMESTRING.getBytes(), SHARED_KEY_ALG)] ---------------------------------
org.apache.commons.lang3.exception.ContextedRuntimeException: java.lang.NullPointerException: Cannot invoke "net.sourceforge.pmd.lang.java.ast.ASTVariableId.getInitializer()" because "varDecl" is null
Exception Context:
[1:Rule applied on node=!debug only! [ConstructorCall:82:28]new SecretKeySpec(SOMESTRING.getBytes(), SHARED_KEY_ALG)]
---------------------------------
at net.sourceforge.pmd.util.AssertionUtil.contexted(AssertionUtil.java:257)
at net.sourceforge.pmd.lang.rule.internal.RuleApplicator.applyOnIndex(RuleApplicator.java:79)
at net.sourceforge.pmd.lang.rule.internal.RuleApplicator.apply(RuleApplicator.java:57)
at net.sourceforge.pmd.lang.rule.internal.RuleSets.apply(RuleSets.java:183)
at net.sourceforge.pmd.lang.impl.PmdRunnable.processSource(PmdRunnable.java:140)
at net.sourceforge.pmd.lang.impl.PmdRunnable.run(PmdRunnable.java:80)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.NullPointerException: Cannot invoke "net.sourceforge.pmd.lang.java.ast.ASTVariableId.getInitializer()" because "varDecl" is null
at net.sourceforge.pmd.lang.java.rule.security.AbstractHardCodedConstructorArgsVisitor.validateProperKeyArgument(AbstractHardCodedConstructorArgsVisitor.java:68)
at net.sourceforge.pmd.lang.java.rule.security.AbstractHardCodedConstructorArgsVisitor.visit(AbstractHardCodedConstructorArgsVisitor.java:35)
at net.sourceforge.pmd.lang.java.rule.security.HardCodedCryptoKeyRule.visit(HardCodedCryptoKeyRule.java:14)
at net.sourceforge.pmd.lang.java.ast.ASTConstructorCall.acceptVisitor(ASTConstructorCall.java:34)
at net.sourceforge.pmd.lang.java.ast.AbstractJavaNode.acceptVisitor(AbstractJavaNode.java:38)
at net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.apply(AbstractJavaRule.java:30)
at net.sourceforge.pmd.lang.rule.RuleReference.apply(RuleReference.java:413)
at net.sourceforge.pmd.lang.rule.internal.RuleApplicator.applyOnIndex(RuleApplicator.java:77)
... 9 more |