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

@@ -89,7 +89,7 @@ public final class Log {
try {
int checkpointToWrite = (point_ > 0 ? point_ : this.lastCheckPoint);
if (msg_.equals("") == false) {
if ("".equals(msg_) == false) {
String line = this.dateFormat.format(new Date()) + " (" + level_ + ") " + msg_;
if (this.checkpoints.containsKey(checkpointToWrite) && this.checkpoints.get(checkpointToWrite) != null) {
this.checkpoints.get(checkpointToWrite).add(line);