Small updates #7
Annotations
10 errors and 10 warnings
The class name 'Coverage' doesn't match '^Test.*$|^[A-Z][a-zA-Z0-9]*Test(s|Case)?$':
coverage/src/test/java/Coverage/Coverage.java#L5
Configurable naming conventions for type declarations. This rule reports
type declarations which do not match the regex that applies to their
specific kind (e.g. enum or interface). Each regex can be configured through
properties.
By default, this rule uses the standard Java naming convention (Pascal case).
The rule can detect utility classes and enforce a different naming convention
on those. E.g. setting the property `utilityClassPattern` to
`[A-Z][a-zA-Z0-9]+(Utils?|Helper|Constants)` reports any utility class, whose name
does not end in "Util(s)", "Helper" or "Constants".
For this rule, a utility class is defined as: a concrete class that does not
inherit from a super class or implement any interface and only has static fields
or methods.
This rule detects test classes using the following convention: Test classes are top-level classes, that
either inherit from JUnit 3 TestCase or have at least one method annotated with the Test annotations from
JUnit4/5 or TestNG.
ClassNamingConventions (Priority: 1, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_codestyle.html#classnamingconventions
|
Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter:
vip-api/src/main/java/fr/insalyon/creatis/vip/api/business/DataApiBusiness.java#L409
The FileInputStream and FileOutputStream classes contains a finalizer method which will cause garbage
collection pauses.
See [JDK-8080225](https://bugs.openjdk.org/browse/JDK-8080225) for details.
The FileReader and FileWriter constructors instantiate FileInputStream and FileOutputStream,
again causing garbage collection issues while finalizer methods are called.
* Use `Files.newInputStream(Paths.get(fileName))` instead of `new FileInputStream(fileName)`.
* Use `Files.newOutputStream(Paths.get(fileName))` instead of `new FileOutputStream(fileName)`.
* Use `Files.newBufferedReader(Paths.get(fileName))` instead of `new FileReader(fileName)`.
* Use `Files.newBufferedWriter(Paths.get(fileName))` instead of `new FileWriter(fileName)`.
Please note, that the `java.nio` API does not throw a `FileNotFoundException` anymore, instead
it throws a `NoSuchFileException`. If your code dealt explicitly with a `FileNotFoundException`,
then this needs to be adjusted. Both exceptions are subclasses of `IOException`, so catching
that one covers both.
AvoidFileStream (Priority: 1, Ruleset: Performance)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_performance.html#avoidfilestream
|
The instance method name 'VIPtoCarminStatus' doesn't match '[a-z][a-zA-Z0-9]*':
vip-api/src/main/java/fr/insalyon/creatis/vip/api/business/ExecutionBusiness.java#L491
Configurable naming conventions for method declarations. This rule reports
method declarations which do not match the regex that applies to their
specific kind (e.g. JUnit test or native method). Each regex can be
configured through properties.
By default this rule uses the standard Java naming convention (Camel case).
MethodNamingConventions (Priority: 1, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_codestyle.html#methodnamingconventions
|
The final field name 'DATE_TIME_FORMAT' doesn't match '[a-z][a-zA-Z0-9]*':
vip-api/src/main/java/fr/insalyon/creatis/vip/api/business/StatsApiBusiness.java#L192
Configurable naming conventions for field declarations. This rule reports variable declarations
which do not match the regex that applies to their specific kind ---e.g. constants (static final),
enum constant, final field. Each regex can be configured through properties.
By default this rule uses the standard Java naming convention (Camel case), and uses the ALL_UPPER
convention for constants and enum constants.
FieldNamingConventions (Priority: 1, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_codestyle.html#fieldnamingconventions
|
Avoid throwing raw exception types.:
vip-api/src/main/java/fr/insalyon/creatis/vip/api/business/VipConfigurer.java#L91
Avoid throwing certain exception types. Rather than throw a raw RuntimeException, Throwable,
Exception, or Error, use a subclassed exception or error instead.
AvoidThrowingRawExceptionTypes (Priority: 1, Ruleset: Design)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_design.html#avoidthrowingrawexceptiontypes
|
The local variable name 'institution_string' doesn't match '[a-z][a-zA-Z0-9]*':
vip-api/src/main/java/fr/insalyon/creatis/vip/api/controller/EgiController.java#L57
Configurable naming conventions for local variable declarations and other locally-scoped
variables. This rule reports variable declarations which do not match the regex that applies to their
specific kind (e.g. final variable, or catch-clause parameter). Each regex can be configured through
properties.
By default this rule uses the standard Java naming convention (Camel case).
LocalVariableNamingConventions (Priority: 1, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_codestyle.html#localvariablenamingconventions
|
The enum constant name 'File' doesn't match '[A-Z][A-Z_0-9]*':
vip-api/src/main/java/fr/insalyon/creatis/vip/api/model/ParameterType.java#L42
Configurable naming conventions for field declarations. This rule reports variable declarations
which do not match the regex that applies to their specific kind ---e.g. constants (static final),
enum constant, final field. Each regex can be configured through properties.
By default this rule uses the standard Java naming convention (Camel case), and uses the ALL_UPPER
convention for constants and enum constants.
FieldNamingConventions (Priority: 1, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_codestyle.html#fieldnamingconventions
|
The enum constant name 'String' doesn't match '[A-Z][A-Z_0-9]*':
vip-api/src/main/java/fr/insalyon/creatis/vip/api/model/ParameterType.java#L42
Configurable naming conventions for field declarations. This rule reports variable declarations
which do not match the regex that applies to their specific kind ---e.g. constants (static final),
enum constant, final field. Each regex can be configured through properties.
By default this rule uses the standard Java naming convention (Camel case), and uses the ALL_UPPER
convention for constants and enum constants.
FieldNamingConventions (Priority: 1, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_codestyle.html#fieldnamingconventions
|
The enum constant name 'Boolean' doesn't match '[A-Z][A-Z_0-9]*':
vip-api/src/main/java/fr/insalyon/creatis/vip/api/model/ParameterType.java#L42
Configurable naming conventions for field declarations. This rule reports variable declarations
which do not match the regex that applies to their specific kind ---e.g. constants (static final),
enum constant, final field. Each regex can be configured through properties.
By default this rule uses the standard Java naming convention (Camel case), and uses the ALL_UPPER
convention for constants and enum constants.
FieldNamingConventions (Priority: 1, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_codestyle.html#fieldnamingconventions
|
The enum constant name 'Int64' doesn't match '[A-Z][A-Z_0-9]*':
vip-api/src/main/java/fr/insalyon/creatis/vip/api/model/ParameterType.java#L42
Configurable naming conventions for field declarations. This rule reports variable declarations
which do not match the regex that applies to their specific kind ---e.g. constants (static final),
enum constant, final field. Each regex can be configured through properties.
By default this rule uses the standard Java naming convention (Camel case), and uses the ALL_UPPER
convention for constants and enum constants.
FieldNamingConventions (Priority: 1, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_codestyle.html#fieldnamingconventions
|
Each class should declare at least one constructor:
coverage/src/test/java/Coverage/Coverage.java#L5
Each non-static class should declare at least one constructor.
Classes with solely static members are ignored, refer to [UseUtilityClassRule](pmd_rules_java_design.html#useutilityclass) to detect those.
AtLeastOneConstructor (Priority: 3, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_codestyle.html#atleastoneconstructor
|
Parameter 'vipConfigFolder' is not assigned and could be declared final:
vip-api/src/main/java/fr/insalyon/creatis/vip/api/ApiPropertiesInitializer.java#L66
Reports method and constructor parameters that can be made final because they are never reassigned within the body of the method.
This rule ignores unused parameters so as not to overlap with the rule {% rule java/bestpractices/UnusedFormalParameter %}.
It will also ignore the parameters of abstract methods.
MethodArgumentCouldBeFinal (Priority: 3, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_codestyle.html#methodargumentcouldbefinal
|
Parameter 'environment' is not assigned and could be declared final:
vip-api/src/main/java/fr/insalyon/creatis/vip/api/ApiPropertiesInitializer.java#L67
Reports method and constructor parameters that can be made final because they are never reassigned within the body of the method.
This rule ignores unused parameters so as not to overlap with the rule {% rule java/bestpractices/UnusedFormalParameter %}.
It will also ignore the parameters of abstract methods.
MethodArgumentCouldBeFinal (Priority: 3, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_codestyle.html#methodargumentcouldbefinal
|
Avoid excessively long variable names like configFileResource:
vip-api/src/main/java/fr/insalyon/creatis/vip/api/ApiPropertiesInitializer.java#L69
Fields, formal arguments, or local variable names that are too long can make the code difficult to follow.
LongVariable (Priority: 3, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_codestyle.html#longvariable
|
Local variable 'configFileResource' could be declared final:
vip-api/src/main/java/fr/insalyon/creatis/vip/api/ApiPropertiesInitializer.java#L69
A local variable assigned only once can be declared final.
LocalVariableCouldBeFinal (Priority: 3, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_codestyle.html#localvariablecouldbefinal
|
The String literal " required in api conf file" appears 5 times in this file; the first occurrence is on line 106:
vip-api/src/main/java/fr/insalyon/creatis/vip/api/ApiPropertiesInitializer.java#L106
Code containing duplicate String literals can usually be improved by declaring the String as a constant field.
AvoidDuplicateLiterals (Priority: 3, Ruleset: Error Prone)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_errorprone.html#avoidduplicateliterals
|
Parameter 'propertyKey' is not assigned and could be declared final:
vip-api/src/main/java/fr/insalyon/creatis/vip/api/ApiPropertiesInitializer.java#L116
Reports method and constructor parameters that can be made final because they are never reassigned within the body of the method.
This rule ignores unused parameters so as not to overlap with the rule {% rule java/bestpractices/UnusedFormalParameter %}.
It will also ignore the parameters of abstract methods.
MethodArgumentCouldBeFinal (Priority: 3, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_codestyle.html#methodargumentcouldbefinal
|
Parameter 'targetType' is not assigned and could be declared final:
vip-api/src/main/java/fr/insalyon/creatis/vip/api/ApiPropertiesInitializer.java#L116
Reports method and constructor parameters that can be made final because they are never reassigned within the body of the method.
This rule ignores unused parameters so as not to overlap with the rule {% rule java/bestpractices/UnusedFormalParameter %}.
It will also ignore the parameters of abstract methods.
MethodArgumentCouldBeFinal (Priority: 3, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_codestyle.html#methodargumentcouldbefinal
|
Avoid excessively long variable names like CORS_AUTHORIZED_DOMAINS:
vip-api/src/main/java/fr/insalyon/creatis/vip/api/CarminProperties.java#L39
Fields, formal arguments, or local variable names that are too long can make the code difficult to follow.
LongVariable (Priority: 3, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_codestyle.html#longvariable
|
Avoid excessively long variable names like PLATFORM_DESCRIPTION:
vip-api/src/main/java/fr/insalyon/creatis/vip/api/CarminProperties.java#L43
Fields, formal arguments, or local variable names that are too long can make the code difficult to follow.
LongVariable (Priority: 3, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_codestyle.html#longvariable
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
PMD Report
|
465 KB |
|