Skip to content

Commit

Permalink
ConcurrentModificationException
Browse files Browse the repository at this point in the history
  • Loading branch information
awidesky committed Mar 4, 2023
1 parent b824b37 commit 8ec290d
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class LoggerThread extends Thread {
private boolean verbose = false;
private DateFormat datePrefix = null;

public static final String version = "v1.7.0";
public static final String version = "v1.8.0";

public LoggerThread() {}

Expand Down Expand Up @@ -136,14 +136,14 @@ public void setVerbose(boolean verbose) {
}
public void setVerboseAllChildren(boolean verbose) {
this.verbose = verbose;
children.parallelStream().forEach(l -> l.setVerbose(verbose));
children.stream().forEach(l -> l.setVerbose(verbose));
}
public void setDatePrefix(DateFormat datePrefix) {
this.datePrefix = datePrefix;
}
public void setDatePrefixAllChildren(DateFormat datePrefix) {
this.datePrefix = datePrefix;
children.parallelStream().forEach(l -> l.setDatePrefix(datePrefix));
children.stream().forEach(l -> l.setDatePrefix(datePrefix));
}

/**
Expand All @@ -153,7 +153,8 @@ public void kill(int timeOut) {

isStop = true;

children.parallelStream().forEach(TaskLogger::close);
new HashSet<>(children).stream().forEach(TaskLogger::close);

try {
this.join(timeOut);
} catch (InterruptedException e) {
Expand Down

0 comments on commit 8ec290d

Please sign in to comment.