File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/main/java/ai/timefold/solver/benchmarks/micro/common Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 3838import java .time .Instant ;
3939import java .time .ZoneId ;
4040import java .util .Arrays ;
41+ import java .util .Objects ;
4142import java .util .Optional ;
4243import java .util .Properties ;
4344
@@ -54,14 +55,13 @@ public abstract class AbstractMain<C extends AbstractConfiguration> {
5455
5556 protected final Logger LOGGER = LoggerFactory .getLogger (getClass ());
5657 private final String subpackage ;
57- private final String runId ;
5858 private final Path resultsDirectory ;
5959
6060 protected AbstractMain (String subpackage ) {
6161 this .subpackage = subpackage ;
62- var runId = System .getenv ("RUN_ID" );
63- this . runId = runId == null || runId . isBlank () ? getTimestamp () : runId .strip ();
64- this .resultsDirectory = Path .of ("results" , subpackage , getTimestamp () );
62+ var runId = Objects . requireNonNullElse ( System .getenv ("RUN_ID" ), getTimestamp ())
63+ .strip ();
64+ this .resultsDirectory = Path .of ("results" , subpackage , runId );
6565 resultsDirectory .toFile ().mkdirs ();
6666 }
6767
You can’t perform that action at this time.
0 commit comments