From cf4255bf7f676143abbb960cf738c275284749b9 Mon Sep 17 00:00:00 2001 From: zhoudaxia <1018795633@qq.cin> Date: Thu, 1 Sep 2016 22:00:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=A5=E9=87=8D=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../robocode.api/src/main/java/net/sf/robocode/io/Logger.java | 2 +- .../src/main/java/net/sf/robocode/security/HiddenAccess.java | 1 - .../robocode.api/src/main/java/robocode/Event.java | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) 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);