From d9108952de7433767dca037fb824e55c89f6556b Mon Sep 17 00:00:00 2001 From: Alathreon Date: Sun, 8 Feb 2026 14:02:04 +0100 Subject: [PATCH 1/2] More detail in config erros --- .../org/togetherjava/jshellapi/Config.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/JShellAPI/src/main/java/org/togetherjava/jshellapi/Config.java b/JShellAPI/src/main/java/org/togetherjava/jshellapi/Config.java index 5935fb5..7196c77 100644 --- a/JShellAPI/src/main/java/org/togetherjava/jshellapi/Config.java +++ b/JShellAPI/src/main/java/org/togetherjava/jshellapi/Config.java @@ -26,33 +26,33 @@ private static boolean checkJShellWrapperImageName(String imageName) { public Config { if (regularSessionTimeoutSeconds <= 0) - throw new IllegalArgumentException("Invalid value " + regularSessionTimeoutSeconds); + throw new IllegalArgumentException("Invalid regularSessionTimeoutSeconds " + regularSessionTimeoutSeconds); if (oneTimeSessionTimeoutSeconds <= 0) - throw new IllegalArgumentException("Invalid value " + oneTimeSessionTimeoutSeconds); + throw new IllegalArgumentException("Invalid oneTimeSessionTimeoutSeconds " + oneTimeSessionTimeoutSeconds); if (evalTimeoutSeconds <= 0) - throw new IllegalArgumentException("Invalid value " + evalTimeoutSeconds); + throw new IllegalArgumentException("Invalid evalTimeoutSeconds " + evalTimeoutSeconds); if (evalTimeoutValidationLeeway <= 0) - throw new IllegalArgumentException("Invalid value " + evalTimeoutSeconds); + throw new IllegalArgumentException("Invalid evalTimeoutValidationLeeway " + evalTimeoutSeconds); if (sysOutCharLimit <= 0) - throw new IllegalArgumentException("Invalid value " + sysOutCharLimit); + throw new IllegalArgumentException("Invalid sysOutCharLimit " + sysOutCharLimit); if (maxAliveSessions <= 0) - throw new IllegalArgumentException("Invalid value " + maxAliveSessions); + throw new IllegalArgumentException("Invalid maxAliveSessions " + maxAliveSessions); if (dockerMaxRamMegaBytes <= 0) - throw new IllegalArgumentException("Invalid value " + dockerMaxRamMegaBytes); + throw new IllegalArgumentException("Invalid dockerMaxRamMegaBytes " + dockerMaxRamMegaBytes); if (dockerCPUsUsage <= 0) - throw new IllegalArgumentException("Invalid value " + dockerCPUsUsage); + throw new IllegalArgumentException("Invalid dockerCPUsUsage " + dockerCPUsUsage); if (dockerCPUSetCPUs != null && !dockerCPUSetCPUs.matches("[1-9]?\\d([-,]\\d?\\d)?")) - throw new IllegalArgumentException("Invalid value " + dockerCPUSetCPUs); + throw new IllegalArgumentException("Invalid dockerCPUSetCPUs " + dockerCPUSetCPUs); if (schedulerSessionKillScanRateSeconds <= 0) throw new IllegalArgumentException( - "Invalid value " + schedulerSessionKillScanRateSeconds); + "Invalid schedulerSessionKillScanRateSeconds " + schedulerSessionKillScanRateSeconds); if (dockerResponseTimeout <= 0) - throw new IllegalArgumentException("Invalid value " + dockerResponseTimeout); + throw new IllegalArgumentException("Invalid dockerResponseTimeout " + dockerResponseTimeout); if (dockerConnectionTimeout <= 0) - throw new IllegalArgumentException("Invalid value " + dockerConnectionTimeout); + throw new IllegalArgumentException("Invalid dockerConnectionTimeout " + dockerConnectionTimeout); if (!checkJShellWrapperImageName(jshellWrapperImageName)) { - throw new IllegalArgumentException("Invalid value " + jshellWrapperImageName); + throw new IllegalArgumentException("Invalid jshellWrapperImageName " + jshellWrapperImageName); } } } From 38da177ea4a779ef3a08721f54ee018a574717b2 Mon Sep 17 00:00:00 2001 From: Alathreon Date: Sun, 8 Feb 2026 15:55:10 +0100 Subject: [PATCH 2/2] Splotless apply --- .../org/togetherjava/jshellapi/Config.java | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/JShellAPI/src/main/java/org/togetherjava/jshellapi/Config.java b/JShellAPI/src/main/java/org/togetherjava/jshellapi/Config.java index 7196c77..bd7bd85 100644 --- a/JShellAPI/src/main/java/org/togetherjava/jshellapi/Config.java +++ b/JShellAPI/src/main/java/org/togetherjava/jshellapi/Config.java @@ -26,33 +26,40 @@ private static boolean checkJShellWrapperImageName(String imageName) { public Config { if (regularSessionTimeoutSeconds <= 0) - throw new IllegalArgumentException("Invalid regularSessionTimeoutSeconds " + regularSessionTimeoutSeconds); + throw new IllegalArgumentException( + "Invalid regularSessionTimeoutSeconds " + regularSessionTimeoutSeconds); if (oneTimeSessionTimeoutSeconds <= 0) - throw new IllegalArgumentException("Invalid oneTimeSessionTimeoutSeconds " + oneTimeSessionTimeoutSeconds); + throw new IllegalArgumentException( + "Invalid oneTimeSessionTimeoutSeconds " + oneTimeSessionTimeoutSeconds); if (evalTimeoutSeconds <= 0) throw new IllegalArgumentException("Invalid evalTimeoutSeconds " + evalTimeoutSeconds); if (evalTimeoutValidationLeeway <= 0) - throw new IllegalArgumentException("Invalid evalTimeoutValidationLeeway " + evalTimeoutSeconds); + throw new IllegalArgumentException( + "Invalid evalTimeoutValidationLeeway " + evalTimeoutSeconds); if (sysOutCharLimit <= 0) throw new IllegalArgumentException("Invalid sysOutCharLimit " + sysOutCharLimit); if (maxAliveSessions <= 0) throw new IllegalArgumentException("Invalid maxAliveSessions " + maxAliveSessions); if (dockerMaxRamMegaBytes <= 0) - throw new IllegalArgumentException("Invalid dockerMaxRamMegaBytes " + dockerMaxRamMegaBytes); + throw new IllegalArgumentException( + "Invalid dockerMaxRamMegaBytes " + dockerMaxRamMegaBytes); if (dockerCPUsUsage <= 0) throw new IllegalArgumentException("Invalid dockerCPUsUsage " + dockerCPUsUsage); if (dockerCPUSetCPUs != null && !dockerCPUSetCPUs.matches("[1-9]?\\d([-,]\\d?\\d)?")) throw new IllegalArgumentException("Invalid dockerCPUSetCPUs " + dockerCPUSetCPUs); if (schedulerSessionKillScanRateSeconds <= 0) - throw new IllegalArgumentException( - "Invalid schedulerSessionKillScanRateSeconds " + schedulerSessionKillScanRateSeconds); + throw new IllegalArgumentException("Invalid schedulerSessionKillScanRateSeconds " + + schedulerSessionKillScanRateSeconds); if (dockerResponseTimeout <= 0) - throw new IllegalArgumentException("Invalid dockerResponseTimeout " + dockerResponseTimeout); + throw new IllegalArgumentException( + "Invalid dockerResponseTimeout " + dockerResponseTimeout); if (dockerConnectionTimeout <= 0) - throw new IllegalArgumentException("Invalid dockerConnectionTimeout " + dockerConnectionTimeout); + throw new IllegalArgumentException( + "Invalid dockerConnectionTimeout " + dockerConnectionTimeout); if (!checkJShellWrapperImageName(jshellWrapperImageName)) { - throw new IllegalArgumentException("Invalid jshellWrapperImageName " + jshellWrapperImageName); + throw new IllegalArgumentException( + "Invalid jshellWrapperImageName " + jshellWrapperImageName); } } }