diff --git a/代码/workspace_robo4/robocode.api/src/main/java/net/sf/robocode/io/Logger.java b/代码/workspace_robo4/robocode.api/src/main/java/net/sf/robocode/io/Logger.java index a903fd8..4a4c6ba 100644 --- a/代码/workspace_robo4/robocode.api/src/main/java/net/sf/robocode/io/Logger.java +++ b/代码/workspace_robo4/robocode.api/src/main/java/net/sf/robocode/io/Logger.java @@ -97,7 +97,7 @@ public class Logger { ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(baos); - t.printStackTrace(ps); + LOGGER.log("context", t); ps.close(); return baos.toString(); } diff --git a/代码/workspace_robo4/robocode.api/src/main/java/net/sf/robocode/security/HiddenAccess.java b/代码/workspace_robo4/robocode.api/src/main/java/net/sf/robocode/security/HiddenAccess.java index 184001c..d3837b8 100644 --- a/代码/workspace_robo4/robocode.api/src/main/java/net/sf/robocode/security/HiddenAccess.java +++ b/代码/workspace_robo4/robocode.api/src/main/java/net/sf/robocode/security/HiddenAccess.java @@ -110,7 +110,6 @@ public class HiddenAccess { Logger.logError("Can't find robocode.core-1.x.jar module near to robocode.jar"); Logger.logError("Class path: " + System.getProperty("robocode.class.path", null)); } - System.exit(-1); } catch (MalformedURLException e) { Logger.logError(e); } catch (MyException e) { diff --git a/代码/workspace_robo4/robocode.api/src/main/java/robocode/Event.java b/代码/workspace_robo4/robocode.api/src/main/java/robocode/Event.java index ccb128c..eb72787 100644 --- a/代码/workspace_robo4/robocode.api/src/main/java/robocode/Event.java +++ b/代码/workspace_robo4/robocode.api/src/main/java/robocode/Event.java @@ -61,6 +61,7 @@ public abstract class Event implements Comparable, Serializable { * has a lower precedence, i.e. must be listed after the specified event. * 0 means that the precedence of the two events are equal. */ + @Override public int compareTo(Event event) { // Compare the time difference which has precedence over priority. int timeDiff = (int) (time - event.time);