PMD - pull_request #165
Annotations
10 errors
|
Unnecessary modifier 'final' on method 'isInitialized': the method is already in a final class:
examples/powertools-examples-kafka/src/main/java/org/demo/kafka/protobuf/ProtobufProduct.java#L110
Fields in interfaces and annotations are automatically `public static final`, and methods are `public abstract`.
Classes, interfaces or annotations nested in an interface or annotation are automatically `public static`
(all nested interfaces and annotations are automatically static).
Nested enums are automatically `static`.
For historical reasons, modifiers which are implied by the context are accepted by the compiler, but are superfluous.
UnnecessaryModifier (Priority: 1, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.14.0/pmd_rules_java_codestyle.html#unnecessarymodifier
|
|
Use of modifier volatile is not recommended.:
examples/powertools-examples-kafka/src/main/java/org/demo/kafka/protobuf/ProtobufProduct.java#L60
Use of the keyword 'volatile' is generally used to fine tune a Java application, and therefore, requires
a good expertise of the Java Memory Model. Moreover, its range of action is somewhat misknown. Therefore,
the volatile keyword should not be used for maintenance purpose and portability.
AvoidUsingVolatile (Priority: 1, Ruleset: Multithreading)
https://docs.pmd-code.org/pmd-doc-7.14.0/pmd_rules_java_multithreading.html#avoidusingvolatile
|
|
Unnecessary modifier 'final' on method 'getDescriptor': the method is already in a final class:
examples/powertools-examples-kafka/src/main/java/org/demo/kafka/protobuf/ProtobufProduct.java#L35
Fields in interfaces and annotations are automatically `public static final`, and methods are `public abstract`.
Classes, interfaces or annotations nested in an interface or annotation are automatically `public static`
(all nested interfaces and annotations are automatically static).
Nested enums are automatically `static`.
For historical reasons, modifiers which are implied by the context are accepted by the compiler, but are superfluous.
UnnecessaryModifier (Priority: 1, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.14.0/pmd_rules_java_codestyle.html#unnecessarymodifier
|
|
This class has only private constructors and may be final:
examples/powertools-examples-kafka/src/main/java/org/demo/kafka/avro/AvroProduct.java#L216
Reports classes that may be made final because they cannot be extended from outside
their compilation unit anyway. This is because all their constructors are private,
so a subclass could not call the super constructor.
ClassWithOnlyPrivateConstructorsShouldBeFinal (Priority: 1, Ruleset: Design)
https://docs.pmd-code.org/pmd-doc-7.14.0/pmd_rules_java_design.html#classwithonlyprivateconstructorsshouldbefinal
|
|
The method parameter name 'value$' doesn't match '[a-z][a-zA-Z0-9]*':
examples/powertools-examples-kafka/src/main/java/org/demo/kafka/avro/AvroProduct.java#L118
Configurable naming conventions for formal parameters of methods and lambdas.
This rule reports formal parameters which do not match the regex that applies to their
specific kind (e.g. lambda parameter, or final formal parameter). Each regex can be
configured through properties.
By default this rule uses the standard Java naming convention (Camel case).
FormalParameterNamingConventions (Priority: 1, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.14.0/pmd_rules_java_codestyle.html#formalparameternamingconventions
|
|
The method parameter name 'field$' doesn't match '[a-z][a-zA-Z0-9]*':
examples/powertools-examples-kafka/src/main/java/org/demo/kafka/avro/AvroProduct.java#L118
Configurable naming conventions for formal parameters of methods and lambdas.
This rule reports formal parameters which do not match the regex that applies to their
specific kind (e.g. lambda parameter, or final formal parameter). Each regex can be
configured through properties.
By default this rule uses the standard Java naming convention (Camel case).
FormalParameterNamingConventions (Priority: 1, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.14.0/pmd_rules_java_codestyle.html#formalparameternamingconventions
|
|
Avoid the use of value in annotations when its the only element:
examples/powertools-examples-kafka/src/main/java/org/demo/kafka/avro/AvroProduct.java#L117
Avoid the use of value in annotations when it's the only element.
UnnecessaryAnnotationValueElement (Priority: 1, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.14.0/pmd_rules_java_codestyle.html#unnecessaryannotationvalueelement
|
|
The method parameter name 'field$' doesn't match '[a-z][a-zA-Z0-9]*':
examples/powertools-examples-kafka/src/main/java/org/demo/kafka/avro/AvroProduct.java#L106
Configurable naming conventions for formal parameters of methods and lambdas.
This rule reports formal parameters which do not match the regex that applies to their
specific kind (e.g. lambda parameter, or final formal parameter). Each regex can be
configured through properties.
By default this rule uses the standard Java naming convention (Camel case).
FormalParameterNamingConventions (Priority: 1, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.14.0/pmd_rules_java_codestyle.html#formalparameternamingconventions
|
|
Document empty constructor:
examples/powertools-examples-kafka/src/main/java/org/demo/kafka/avro/AvroProduct.java#L84
Uncommented Empty Constructor finds instances where a constructor does not
contain statements, but there is no comment. By explicitly commenting empty
constructors it is easier to distinguish between intentional (commented)
and unintentional empty constructors.
UncommentedEmptyConstructor (Priority: 1, Ruleset: Documentation)
https://docs.pmd-code.org/pmd-doc-7.14.0/pmd_rules_java_documentation.html#uncommentedemptyconstructor
|
|
Document empty constructor:
examples/powertools-examples-kafka/src/main/java/org/demo/kafka/Product.java#L22
Uncommented Empty Constructor finds instances where a constructor does not
contain statements, but there is no comment. By explicitly commenting empty
constructors it is easier to distinguish between intentional (commented)
and unintentional empty constructors.
UncommentedEmptyConstructor (Priority: 1, Ruleset: Documentation)
https://docs.pmd-code.org/pmd-doc-7.14.0/pmd_rules_java_documentation.html#uncommentedemptyconstructor
|
Artifacts
Produced during runtime
| Name | Size | Digest | |
|---|---|---|---|
|
PMD Report
Expired
|
5.01 KB |
sha256:96acc69e42bef5de3c0bec2a98d0e1bdaa1488ec63f99ef4933df784fb388319
|
|