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

This commit is contained in:
Laurent Clouet
2024-06-07 14:35:47 +00:00
parent 824dfe4ef6
commit 0a7f1f9f1b
14 changed files with 29 additions and 28 deletions

View File

@@ -119,7 +119,7 @@ public class Linux extends OS {
if ((userLevel = reader.readLine()) != null) {
// Root user in *ix systems -independently of the alias used to login- has a id value of 0. On top of being a user with root capabilities,
// to support changing the priority the nice tool must be accessible from the current user
return (userLevel.equals("0")) & isNiceAvailable();
return ("0".equals(userLevel)) & isNiceAvailable();
}
}
catch (IOException e) {