Ref: add new static analyser rule: bestpractices.xml/UnusedAssignment

This commit is contained in:
Laurent Clouet
2024-06-06 01:05:27 +00:00
parent fd33b6d666
commit 1b3cf096d1
8 changed files with 20 additions and 29 deletions

View File

@@ -85,13 +85,12 @@ public class Log {
if (LEVEL_DEBUG.equals(level_) && this.debugLevel == false) {
return;
}
String line = null;
try {
int checkpointToWrite = (point_ > 0 ? point_ : this.lastCheckPoint);
if (msg_.equals("") == false) {
line = this.dateFormat.format(new Date()) + " (" + level_ + ") " + msg_;
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);
}