Ref: add new static analyser rule: category/java/bestpractices.xml/LooseCoupling

This commit is contained in:
Laurent Clouet
2024-06-07 16:05:16 +02:00
parent bcb9eff255
commit 89ff34f0bb
2 changed files with 2 additions and 2 deletions

View File

@@ -21,7 +21,7 @@
<rule ref="category/java/bestpractices.xml/UnusedPrivateField" /> <rule ref="category/java/bestpractices.xml/UnusedPrivateField" />
<rule ref="category/java/bestpractices.xml/UnusedPrivateMethod" /> <rule ref="category/java/bestpractices.xml/UnusedPrivateMethod" />
<rule ref="category/java/bestpractices.xml/UseCollectionIsEmpty" /> <rule ref="category/java/bestpractices.xml/UseCollectionIsEmpty" />
<rule ref="category/java/bestpractices.xml/LooseCoupling" />
<rule ref="category/java/codestyle.xml/ExtendsObject" /> <rule ref="category/java/codestyle.xml/ExtendsObject" />
<rule ref="category/java/codestyle.xml/ForLoopShouldBeWhileLoop" /> <rule ref="category/java/codestyle.xml/ForLoopShouldBeWhileLoop" />
<rule ref="category/java/codestyle.xml/TooManyStaticImports" /> <rule ref="category/java/codestyle.xml/TooManyStaticImports" />

View File

@@ -366,7 +366,7 @@ import lombok.Data;
* Only logs instances where something was detected, otherwise is it will only print "FilesystemHealthCheck started" * Only logs instances where something was detected, otherwise is it will only print "FilesystemHealthCheck started"
* @return an ArrayList of Strings containing all logs of the FSHealth check * @return an ArrayList of Strings containing all logs of the FSHealth check
*/ */
public ArrayList<String> filesystemHealthCheck() { public List<String> filesystemHealthCheck() {
ArrayList<String> logs = new ArrayList<>(); ArrayList<String> logs = new ArrayList<>();
String f = "FSHealth: "; String f = "FSHealth: ";
logs.add(f + "FilesystemHealthCheck started"); logs.add(f + "FilesystemHealthCheck started");