Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Exclusion Advent-ure: constant arguments (#5808)
Browse files Browse the repository at this point in the history
  • Loading branch information
gsheasby authored Dec 6, 2021
1 parent b50c0ab commit deb412a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang3.Validate;

@SuppressFBWarnings("SLF4J_ILLEGAL_PASSED_CLASS")
public class InterruptibleFileLogCollector implements LogCollector {
Expand All @@ -46,7 +45,11 @@ public class InterruptibleFileLogCollector implements LogCollector {
public InterruptibleFileLogCollector(File logDirectory) {
Preconditions.checkArgument(!logDirectory.isFile(), "Log directory cannot be a file");
if (!logDirectory.exists()) {
Validate.isTrue(logDirectory.mkdirs(), "Error making log directory: " + logDirectory.getAbsolutePath());
boolean successfullyCreated = logDirectory.mkdirs();
Preconditions.checkState(
successfullyCreated,
"Error making log directory",
SafeArg.of("logDirectory", logDirectory.getAbsolutePath()));
}
this.logDirectory = logDirectory;
}
Expand Down
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ allprojects {
'StaticAssignmentInConstructor',
'StrictUnusedVariable',
'ThreadPriorityCheck',
'TooManyArguments',
'ValidateConstantMessage'
'TooManyArguments'
}
}

Expand Down

0 comments on commit deb412a

Please sign in to comment.