PMD Results
The following document contains the results of PMD 7.7.0.
Violations By Priority
Priority 3
gov/nist/secauto/metaschema/schemagen/ModuleIndex.java
Rule | Violation | Line |
---|---|---|
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 33 |
gov/nist/secauto/metaschema/schemagen/json/impl/AbstractDefineableJsonSchema.java
Rule | Violation | Line |
---|---|---|
AvoidSynchronizedStatement | Use ReentrantLock rather than synchronization | 23–29 |
gov/nist/secauto/metaschema/schemagen/json/impl/AbstractModelDefinitionJsonSchema.java
Rule | Violation | Line |
---|---|---|
DataClass | The class 'AbstractModelDefinitionJsonSchema' is suspected to be a Data Class (WOC=28.571%, NOPA=0, NOAM=5, WMC=15) | 26 |
gov/nist/secauto/metaschema/schemagen/json/impl/ChoiceGroupInstanceJsonProperty.java
Rule | Violation | Line |
---|---|---|
UnusedFormalParameter | Avoid unused constructor parameters such as 'state'. | 32 |
gov/nist/secauto/metaschema/schemagen/json/impl/JsonGenerationState.java
Rule | Violation | Line |
---|---|---|
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 47 |
AvoidSynchronizedStatement | Use ReentrantLock rather than synchronization | 104–115 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 177 |
gov/nist/secauto/metaschema/schemagen/json/impl/MetadataUtils.java
Rule | Violation | Line |
---|---|---|
CyclomaticComplexity | The method 'toJsonValue(Object, IDataTypeAdapter<?>)' has a cyclomatic complexity of 18. | 76 |
gov/nist/secauto/metaschema/schemagen/json/impl/NamedModelInstanceJsonProperty.java
Rule | Violation | Line |
---|---|---|
UnusedFormalParameter | Avoid unused constructor parameters such as 'state'. | 28 |
gov/nist/secauto/metaschema/schemagen/json/impl/builder/KeyedObjectBuilder.java
Rule | Violation | Line |
---|---|---|
CognitiveComplexity | The method 'build(ObjectNode, IJsonGenerationState)' has a cognitive complexity of 16, current threshold is 15 | 28 |
gov/nist/secauto/metaschema/schemagen/xml/impl/AbstractXmlDatatypeProvider.java
Rule | Violation | Line |
---|---|---|
AvoidSynchronizedStatement | Use ReentrantLock rather than synchronization | 34–47 |
gov/nist/secauto/metaschema/schemagen/xml/impl/XmlGenerationState.java
Rule | Violation | Line |
---|---|---|
CouplingBetweenObjects | A value of 21 may denote a high amount of coupling within the class (threshold: 20) | 6–265 |
Files
gov/nist/secauto/metaschema/schemagen/ModuleIndex.java
Rule | Violation | Priority | Line |
---|---|---|---|
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 33 |
gov/nist/secauto/metaschema/schemagen/json/impl/AbstractDefineableJsonSchema.java
Rule | Violation | Priority | Line |
---|---|---|---|
AvoidSynchronizedStatement | Use ReentrantLock rather than synchronization | 3 | 23–29 |
gov/nist/secauto/metaschema/schemagen/json/impl/AbstractModelDefinitionJsonSchema.java
Rule | Violation | Priority | Line |
---|---|---|---|
DataClass | The class 'AbstractModelDefinitionJsonSchema' is suspected to be a Data Class (WOC=28.571%, NOPA=0, NOAM=5, WMC=15) | 3 | 26 |
gov/nist/secauto/metaschema/schemagen/json/impl/ChoiceGroupInstanceJsonProperty.java
Rule | Violation | Priority | Line |
---|---|---|---|
UnusedFormalParameter | Avoid unused constructor parameters such as 'state'. | 3 | 32 |
gov/nist/secauto/metaschema/schemagen/json/impl/JsonGenerationState.java
Rule | Violation | Priority | Line |
---|---|---|---|
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 47 |
AvoidSynchronizedStatement | Use ReentrantLock rather than synchronization | 3 | 104–115 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 177 |
gov/nist/secauto/metaschema/schemagen/json/impl/MetadataUtils.java
Rule | Violation | Priority | Line |
---|---|---|---|
CyclomaticComplexity | The method 'toJsonValue(Object, IDataTypeAdapter<?>)' has a cyclomatic complexity of 18. | 3 | 76 |
gov/nist/secauto/metaschema/schemagen/json/impl/NamedModelInstanceJsonProperty.java
Rule | Violation | Priority | Line |
---|---|---|---|
UnusedFormalParameter | Avoid unused constructor parameters such as 'state'. | 3 | 28 |
gov/nist/secauto/metaschema/schemagen/json/impl/builder/KeyedObjectBuilder.java
Rule | Violation | Priority | Line |
---|---|---|---|
CognitiveComplexity | The method 'build(ObjectNode, IJsonGenerationState)' has a cognitive complexity of 16, current threshold is 15 | 3 | 28 |
gov/nist/secauto/metaschema/schemagen/xml/impl/AbstractXmlDatatypeProvider.java
Rule | Violation | Priority | Line |
---|---|---|---|
AvoidSynchronizedStatement | Use ReentrantLock rather than synchronization | 3 | 34–47 |
gov/nist/secauto/metaschema/schemagen/xml/impl/XmlGenerationState.java
Rule | Violation | Priority | Line |
---|---|---|---|
CouplingBetweenObjects | A value of 21 may denote a high amount of coupling within the class (threshold: 20) | 3 | 6–265 |
Suppressed Violations
Filename | Rule message | Suppression type | Reason |
---|---|---|---|
gov/nist/secauto/metaschema/schemagen/AbstractSchemaGenerator.java | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | //nopmd | need to catch close exception |
gov/nist/secauto/metaschema/schemagen/AbstractSchemaGenerator.java | A catch statement that catches an exception only to rethrow it should be avoided. | //nopmd | avoid nesting same exception |
gov/nist/secauto/metaschema/schemagen/datatype/AbstractDatatypeManager.java | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | //nopmd | - intentional |
gov/nist/secauto/metaschema/schemagen/json/IDefineableJsonSchema.java | Avoid short class names like IKey | @suppresswarnings | |
gov/nist/secauto/metaschema/schemagen/json/IDefineableJsonSchema.java | Avoid using short method names | @suppresswarnings | |
gov/nist/secauto/metaschema/schemagen/json/IDefineableJsonSchema.java | Avoid using short method names | @suppresswarnings | |
gov/nist/secauto/metaschema/schemagen/json/JsonSchemaGenerator.java | Ensure that resources like this JsonGenerator object are closed after use | //nopmd | not owned |
gov/nist/secauto/metaschema/schemagen/json/JsonSchemaGenerator.java | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | //nopmd | no concurrent access |
gov/nist/secauto/metaschema/schemagen/json/impl/AbstractDefinitionJsonSchema.java | A method should have only one exit point, and that should be the last statement in the method | @suppresswarnings | |
gov/nist/secauto/metaschema/schemagen/json/impl/AbstractDefinitionJsonSchema.java | A method should have only one exit point, and that should be the last statement in the method | @suppresswarnings | |
gov/nist/secauto/metaschema/schemagen/json/impl/AbstractModelDefinitionJsonSchema.java | A method should have only one exit point, and that should be the last statement in the method | @suppresswarnings | |
gov/nist/secauto/metaschema/schemagen/json/impl/AbstractModelDefinitionJsonSchema.java | A method should have only one exit point, and that should be the last statement in the method | @suppresswarnings | |
gov/nist/secauto/metaschema/schemagen/json/impl/AssemblyDefinitionJsonSchema.java | Avoid instantiating new objects inside loops | //nopmd | - intentional |
gov/nist/secauto/metaschema/schemagen/json/impl/DataTypeRestrictionDefinitionJsonSchema.java | Avoid instantiating new objects inside loops | //nopmd | unavoidable |
gov/nist/secauto/metaschema/schemagen/json/impl/DataTypeRestrictionDefinitionJsonSchema.java | Avoid instantiating new objects inside loops | //nopmd | unavoidable |
gov/nist/secauto/metaschema/schemagen/json/impl/JsonGenerationState.java | Ensure that resources like this JsonGenerator object are closed after use | //nopmd | not closable here |
gov/nist/secauto/metaschema/schemagen/json/impl/builder/AbstractCollectionBuilder.java | Avoid short class names like Type | @suppresswarnings | |
gov/nist/secauto/metaschema/schemagen/xml/XmlSchemaGenerator.java | A value of 21 may denote a high amount of coupling within the class (threshold: 20) | //nopmd | |
gov/nist/secauto/metaschema/schemagen/xml/XmlSchemaGenerator.java | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | //nopmd | concurrency not needed |
gov/nist/secauto/metaschema/schemagen/xml/impl/DocumentationGenerator.java | The method 'generateDocumentation(String, MarkupLine, List<MarkupMultiline>, String, XmlGenerationState)' has a cyclomatic complexity of 10. | //nopmd | acceptable complexity |
gov/nist/secauto/metaschema/schemagen/xml/impl/schematype/XmlComplexTypeAssemblyDefinition.java | The method 'generateModelInstance(IModelInstanceAbsolute, XmlGenerationState)' has a cyclomatic complexity of 12. | //nopmd | acceptable complexity |
gov/nist/secauto/metaschema/schemagen/xml/impl/schematype/XmlSimpleTypeUnion.java | The method 'generate(XmlGenerationState)' has a cyclomatic complexity of 10. | //nopmd | unavoidable complexity |