Skip to content

Commit aa06d21

Browse files
authored
Merge pull request #412 from avinxshKD/fix/maxtime-double
fix maxtime as double in concoredocker.java, fixes
2 parents de5c3e4 + 586a7c2 commit aa06d21

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

concoredocker.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class concoredocker {
2626
private static Map<String, Object> params = new HashMap<>();
2727
// simtime as double to preserve fractional values (e.g. "[0.0, ...]")
2828
private static double simtime = 0;
29-
private static int maxtime;
29+
private static double maxtime;
3030

3131
public static void main(String[] args) {
3232
try {
@@ -109,12 +109,12 @@ private static Map<String, Object> parseFile(String filename) throws IOException
109109
* Sets maxtime from concore.maxtime file, or uses defaultValue if file not found.
110110
* Catches both IOException and RuntimeException to match Python safe_literal_eval.
111111
*/
112-
private static void defaultMaxTime(int defaultValue) {
112+
private static void defaultMaxTime(double defaultValue) {
113113
try {
114114
String content = new String(Files.readAllBytes(Paths.get(inpath + "1/concore.maxtime")));
115115
Object parsed = literalEval(content.trim());
116116
if (parsed instanceof Number) {
117-
maxtime = ((Number) parsed).intValue();
117+
maxtime = ((Number) parsed).doubleValue();
118118
} else {
119119
maxtime = defaultValue;
120120
}

0 commit comments

Comments
 (0)