Skip to content

Commit c3b6f84

Browse files
authored
Merge pull request #468 from avinxshKD/fix/463-java-public-api
fix: concoredocker API methods were private, class was uncallable from outside
2 parents e055f5e + c6cfa94 commit c3b6f84

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

concoredocker.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ private static Map<String, Object> parseFile(String filename) throws IOException
112112
* Sets maxtime from concore.maxtime file, or uses defaultValue if file not found.
113113
* Catches both IOException and RuntimeException to match Python safe_literal_eval.
114114
*/
115-
private static void defaultMaxTime(double defaultValue) {
115+
public static void defaultMaxTime(double defaultValue) {
116116
try {
117117
String content = new String(Files.readAllBytes(Paths.get(inpath + "/1/concore.maxtime")));
118118
Object parsed = literalEval(content.trim());
@@ -126,7 +126,7 @@ private static void defaultMaxTime(double defaultValue) {
126126
}
127127
}
128128

129-
private static boolean unchanged() {
129+
public static boolean unchanged() {
130130
if (olds.equals(s)) {
131131
s = "";
132132
return true;
@@ -135,7 +135,7 @@ private static boolean unchanged() {
135135
return false;
136136
}
137137

138-
private static Object tryParam(String n, Object i) {
138+
public static Object tryParam(String n, Object i) {
139139
if (params.containsKey(n)) {
140140
return params.get(n);
141141
} else {
@@ -149,7 +149,7 @@ private static Object tryParam(String n, Object i) {
149149
* Returns: list of values after simtime
150150
* Includes max retry limit to avoid infinite blocking (matches Python behavior).
151151
*/
152-
private static List<Object> read(int port, String name, String initstr) {
152+
public static List<Object> read(int port, String name, String initstr) {
153153
// Parse default value upfront for consistent return type
154154
List<Object> defaultVal = new ArrayList<>();
155155
try {
@@ -275,7 +275,7 @@ private static String toPythonLiteral(Object obj) {
275275
* Prepends simtime+delta to the value list, then serializes to Python-literal format.
276276
* Accepts List or String values (matching Python implementation).
277277
*/
278-
private static void write(int port, String name, Object val, int delta) {
278+
public static void write(int port, String name, Object val, int delta) {
279279
try {
280280
String path = outpath + "/" + port + "/" + name;
281281
StringBuilder content = new StringBuilder();
@@ -322,7 +322,7 @@ private static void write(int port, String name, Object val, int delta) {
322322
* Parses an initial value string like "[0.0, 1.0, 2.0]".
323323
* Extracts simtime from position 0 and returns the remaining values as a List.
324324
*/
325-
private static List<Object> initVal(String simtimeVal) {
325+
public static List<Object> initVal(String simtimeVal) {
326326
List<Object> val = new ArrayList<>();
327327
try {
328328
List<?> inval = (List<?>) literalEval(simtimeVal);

0 commit comments

Comments
 (0)