force PMD v7
PMD v7: fix new design/SimplifyBooleanReturns matches PMD v7: fix new bestpractices/UnusedAssignment matches PMD v7: fix new bestpractices/LiteralsFirstInComparisons matches PMD v7: fix new codestyle/UnnecessaryFullyQualifiedName matches PMD v7: fix new bestpractices/LooseCoupling matches PMD rules: bestpractices/UseVarargs PMD rules: sort lines
This commit is contained in:
@@ -29,6 +29,7 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
@@ -39,7 +40,7 @@ public final class Log {
|
||||
|
||||
private static Log instance = null;
|
||||
|
||||
private Map<Integer, ArrayList<String>> checkpoints = new HashMap<Integer, ArrayList<String>>();
|
||||
private Map<Integer, List<String>> checkpoints = new HashMap<>();
|
||||
private int lastCheckPoint;
|
||||
private DateFormat dateFormat;
|
||||
|
||||
@@ -120,7 +121,7 @@ public final class Log {
|
||||
return this.lastCheckPoint;
|
||||
}
|
||||
|
||||
public Optional<ArrayList<String>> getForCheckPoint(int point_) {
|
||||
public Optional<List<String>> getForCheckPoint(int point_) {
|
||||
return Optional.ofNullable(this.checkpoints.get(point_));
|
||||
}
|
||||
|
||||
@@ -149,8 +150,8 @@ public final class Log {
|
||||
}
|
||||
|
||||
public static synchronized void printCheckPoint(int point_) {
|
||||
Log log = Log.getInstance(null);
|
||||
Optional<ArrayList<String>> logs = log.getForCheckPoint(point_);
|
||||
Log log = getInstance(null);
|
||||
Optional<List<String>> logs = log.getForCheckPoint(point_);
|
||||
if (logs.isPresent()) {
|
||||
for (String alog : logs.get()) {
|
||||
System.out.println(alog);
|
||||
|
||||
Reference in New Issue
Block a user