From c6cfa942172eab05a85cf9d00e0ac9f8d6acc1b7 Mon Sep 17 00:00:00 2001 From: Avinash Kumar Deepak Date: Wed, 25 Feb 2026 14:33:56 +0530 Subject: [PATCH] fix: make concoredocker API methods public static (closes #463) --- concoredocker.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/concoredocker.java b/concoredocker.java index 58b68e7..96cf6ee 100644 --- a/concoredocker.java +++ b/concoredocker.java @@ -112,7 +112,7 @@ private static Map parseFile(String filename) throws IOException * Sets maxtime from concore.maxtime file, or uses defaultValue if file not found. * Catches both IOException and RuntimeException to match Python safe_literal_eval. */ - private static void defaultMaxTime(double defaultValue) { + public static void defaultMaxTime(double defaultValue) { try { String content = new String(Files.readAllBytes(Paths.get(inpath + "/1/concore.maxtime"))); Object parsed = literalEval(content.trim()); @@ -126,7 +126,7 @@ private static void defaultMaxTime(double defaultValue) { } } - private static boolean unchanged() { + public static boolean unchanged() { if (olds.equals(s)) { s = ""; return true; @@ -135,7 +135,7 @@ private static boolean unchanged() { return false; } - private static Object tryParam(String n, Object i) { + public static Object tryParam(String n, Object i) { if (params.containsKey(n)) { return params.get(n); } else { @@ -149,7 +149,7 @@ private static Object tryParam(String n, Object i) { * Returns: list of values after simtime * Includes max retry limit to avoid infinite blocking (matches Python behavior). */ - private static List read(int port, String name, String initstr) { + public static List read(int port, String name, String initstr) { // Parse default value upfront for consistent return type List defaultVal = new ArrayList<>(); try { @@ -275,7 +275,7 @@ private static String toPythonLiteral(Object obj) { * Prepends simtime+delta to the value list, then serializes to Python-literal format. * Accepts List or String values (matching Python implementation). */ - private static void write(int port, String name, Object val, int delta) { + public static void write(int port, String name, Object val, int delta) { try { String path = outpath + "/" + port + "/" + name; StringBuilder content = new StringBuilder(); @@ -322,7 +322,7 @@ private static void write(int port, String name, Object val, int delta) { * Parses an initial value string like "[0.0, 1.0, 2.0]". * Extracts simtime from position 0 and returns the remaining values as a List. */ - private static List initVal(String simtimeVal) { + public static List initVal(String simtimeVal) { List val = new ArrayList<>(); try { List inval = (List) literalEval(simtimeVal);