From c663b877095cd719d9a74cf5622ac8071b89611d Mon Sep 17 00:00:00 2001 From: LiuMingYu <734904515@qq.com> Date: Mon, 22 Aug 2016 09:07:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=98=BB=E6=96=AD=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workspace_robo4/.metadata/.log | 14 +++ .../.projects/robocode.api/.markers | Bin 597 -> 597 bytes .../.projects/robocode.battle/.markers | Bin 933 -> 933 bytes .../.projects/robocode.core/.markers | Bin 677 -> 677 bytes .../.projects/robocode.host/.markers | Bin 2415 -> 2415 bytes .../.projects/robocode.roborumble/.markers | Bin 293 -> 293 bytes .../.projects/robocode.ui.editor/.markers | Bin 1642 -> 1642 bytes .../.projects/robocode.ui/.markers | Bin 1066 -> 1066 bytes .../.safetable/org.eclipse.core.resources | Bin 1188 -> 1328 bytes .../.settings/org.eclipse.jdt.launching.prefs | 2 +- .../.settings/org.eclipse.rse.core.prefs | 1 + .../org.eclipse.e4.workbench/workbench.xmi | 102 +++++++++++------- .../externalLibsTimeStamps | Bin 972 -> 972 bytes .../org.eclipse.jdt.core/savedIndexNames.txt | 17 +-- .../variablesAndContainers.dat | Bin 19199 -> 19199 bytes .../segments.gen | Bin 20 -> 20 bytes .../segments.gen | Bin 20 -> 20 bytes .../segments.gen | Bin 20 -> 20 bytes .../net/sf/robocode/dotnet/host/Module.java | 2 +- .../sf/robocode/installer/AutoExtract.java | 2 +- .../sf/robocode/installer/AutoExtract.java | 2 +- .../sf/robocode/security/HiddenAccess.java | 2 +- .../battle/events/BattleEventDispatcher.java | 22 ++-- .../net/sf/robocode/core/RobocodeMain.java | 2 +- .../java/net/sf/robocode/host/JavaHost.java | 2 +- .../sf/robocode/host/events/EventManager.java | 2 +- .../host/proxies/HostingRobotProxy.java | 6 +- .../host/security/RobotClassLoader.java | 10 +- .../sf/robocode/installer/AutoExtract.java | 2 +- .../roborumble/netengine/FileTransfer.java | 2 +- .../main/java/tested/robots/AwtAttack.java | 4 +- .../tested/robots/ConstructorAwtAttack.java | 4 +- .../robots/ConstructorThreadAttack.java | 4 +- .../main/java/tested/robots/FileAttack.java | 4 +- .../tested/robots/IncludeNamespaceAttack.java | 2 +- .../main/java/tested/robots/ThreadAttack.java | 4 +- .../java/tested/robots/ThreadGroupAttack.java | 2 +- .../main/java/tested/robots/UndeadThread.java | 2 +- .../net/sf/robocode/test/helpers/Assert.java | 4 +- .../net/sf/robocode/ui/editor/EditWindow.java | 2 +- .../sf/robocode/ui/editor/WindowMenuItem.java | 4 +- .../net/sf/robocode/ui/WindowManager.java | 4 +- .../robocode/ui/battle/AwtBattleAdaptor.java | 2 +- 43 files changed, 137 insertions(+), 97 deletions(-) diff --git a/workspace_robo4/.metadata/.log b/workspace_robo4/.metadata/.log index 73d3f3c..e72a544 100644 --- a/workspace_robo4/.metadata/.log +++ b/workspace_robo4/.metadata/.log @@ -12,3 +12,17 @@ user global configuration and to define the default location to store repositori not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and EGit might behave differently since they see different configuration options. This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. +!SESSION 2016-08-22 08:10:39.779 ----------------------------------------------- +eclipse.buildId=4.3.0.I20130605-2000 +java.version=1.6.0_45 +java.vendor=Sun Microsystems Inc. +BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN +Framework arguments: -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product +Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product -data E:\2016Spring\robocodefiles\download\app\workspace_robo4 -product org.eclipse.epp.package.jee.product + +!ENTRY org.eclipse.egit.ui 2 0 2016-08-22 08:10:45.437 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\Terrans Force'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. diff --git a/workspace_robo4/.metadata/.plugins/org.eclipse.core.resources/.projects/robocode.api/.markers b/workspace_robo4/.metadata/.plugins/org.eclipse.core.resources/.projects/robocode.api/.markers index 52c87b292c78857e03ca247cbdc608ad271156b0..cf728b1c9fd1074507ba4551cd70d4804fffd6a0 100644 GIT binary patch delta 83 zcmcc0a+PI+Jfl2MX>n?iYf5HGVp2{jBLf3Raeir0a;j$vGXt}iOUPt9#t-TQ)G#nG KhAo)?^(X*Ab{Yc! delta 83 zcmcc0a+PI+Jfl2Eaeir0a;j$vGXt}iO9%r`X>n?iYf5HGVp2{jBg14n#t-TQ)G#nG KhAo)?^(X);b{Yc! diff --git a/workspace_robo4/.metadata/.plugins/org.eclipse.core.resources/.projects/robocode.battle/.markers b/workspace_robo4/.metadata/.plugins/org.eclipse.core.resources/.projects/robocode.battle/.markers index dc957820d786fb2343144398ef5d0d63f7ba3015..b8400f51d9432364cd49f6e5760f2348385de1b0 100644 GIT binary patch delta 120 zcmZ3=zLb4~0;4=nX>n?iYf5HGVp2{jBLf3Raeir0a;j$vGXt}iOUPt<#vg>#Yz|}6 RU{ohy5Ca2a*n;{0Z2*DIBbxvK delta 120 zcmZ3=zLb4~0;4=faeir0a;j$vGXt}iO9%r`X>n?iYf5HGVp2{jBg15S#vg>#Yz|}6 RU{ohy5Ca2a*n;{0Z2(_QBbxvK diff --git a/workspace_robo4/.metadata/.plugins/org.eclipse.core.resources/.projects/robocode.core/.markers b/workspace_robo4/.metadata/.plugins/org.eclipse.core.resources/.projects/robocode.core/.markers index 789700460e6e17d2b13b3557b3393d450c939f22..5a5ffb364aadf7e284c9289c6dbcdd895a5ff043 100644 GIT binary patch delta 118 zcmZ3=x|DUoXL+8|;?yG7l+2REq?}Yn1_qAe{L-T2RL>M<24*jpkjX-fX9=qL$Jn4w Pz#Ik!#;^tRe|rD`zGo!Y delta 118 zcmZ3=x|DUoXL*j|{L-T2RL>M<24*jp5C)#o;?yG7l+2REq?}YnhRH&VX9=qL$Jn4w Pz#Ik!#;^tRe|rD`o986g diff --git a/workspace_robo4/.metadata/.plugins/org.eclipse.core.resources/.projects/robocode.host/.markers b/workspace_robo4/.metadata/.plugins/org.eclipse.core.resources/.projects/robocode.host/.markers index ca3182ca275e7d69173f8757c535529020e91f71..9af950237546736e4e997007c92f4f515903c7dc 100644 GIT binary patch delta 363 zcmaDa^j>I#HlsXGX>n?iYf5HGVp2{jBLf3Raeir0a;j$vGXt}iOUPs|#+m8_)G#nG zhAo)?``_e3R+GtgOjk9DQvb(@!EbUQyV2x4=F0?Kk-+kbkebbztlWgXGns8GL4(rS Pi7;p)$9Cev<I#HlsX8aeir0a;j$vGXt}iO9%r`X>n?iYf5HGVp2{jBg14b#+m8_)G#nG zhAo)?``_e3R+GtgOjk9DQvb(@!EbUQyV2x4=F0?Kk-+kbkebbztlWgXGns8GL4(rS Pi7;p)$9Cev<M<24*jp5C#Uuum$t~KLY@8 CrVo<< delta 46 zcmZ3=w3KPWKXs1c{L-T2RL>M<24*jp5C)#o;?yG7l+2REq?}Yn1_lPkum$t~KLY?| CCJ&PU diff --git a/workspace_robo4/.metadata/.plugins/org.eclipse.core.resources/.projects/robocode.ui.editor/.markers b/workspace_robo4/.metadata/.plugins/org.eclipse.core.resources/.projects/robocode.ui.editor/.markers index 07c5f24f8032c79d1de2c2abfa5bb79f53480a5d..e8c6943e2a3c3a05b502d5053a1b026d41c116ea 100644 GIT binary patch delta 327 zcmaFG^NMFe9HY#{c+JTwES2&+rNya5t|^%%iAg!Bj0_AM#rdU0$*G$^MR4DIZK$D37X@^JeQyvZ`L2` JMER9N2mm+sUn2kj delta 327 zcmaFG^NMFe9HaQec+JTd89U@Tit|g0l2biXm>HP8TtXOlN{dsATvIYj5|eUL85t&5 zFfAge#*%p|K{aogn+dAvXPIk4zMjA08FuwP(+02xLQJ+ZotpxFwH1q9W2v;I&g I%6<+Z0Q|FGR{#J2 diff --git a/workspace_robo4/.metadata/.plugins/org.eclipse.core.resources/.projects/robocode.ui/.markers b/workspace_robo4/.metadata/.plugins/org.eclipse.core.resources/.projects/robocode.ui/.markers index 5bc69858e43af837aee021a4d7cd914673871570..f4be5ab1765d8630bddc8ebfd4f2c9c95573b324 100644 GIT binary patch delta 219 zcmZ3*v5I3t1f$TzNX^O8jA8OTrNya5t|^%%iAg!Bj0_AM#rdU0$*GJvC*4+#cAObXnfnj24DnYYznf4M?HP8TtXOlN{dsATvIYj5|eUL85tND u7{eAUVBHO5fPfH4gkfT7vOEEO6Tj~xq-1g~(_VsVJehZ?6R-;E#9siWXg_)Y diff --git a/workspace_robo4/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/workspace_robo4/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources index f5db0ab78c23bf22c950be1783a892fa8d4e5dec..4683b6c30c08e4b3d5abdcb528870a568ae6ba9b 100644 GIT binary patch delta 126 zcmZ3&xq)kfg0OFXo`Pd(x`L6Bf`NsVp@EgD@nm}@Yeu7q2P7x9^KV|v2I^myvTaKg-m~JWLem1^}D~BDVkl delta 189 zcmdnMwS;qmg0Ndrrh;Q>x`Lslf}w$xk%g6s#pKgWx_l)?rK!AJ`g$crsj0SxlOHll zPF7&%X9fyS{>UOV*_W9U%9fkV!^jO6|H;h90@6BpEu-9IZdSg@3m7dX+pus?e$1!< hSG1Fb7tZ!!f*91wWQ@Zt){J25H!Cm)FhY&m3IK|0I!^!q diff --git a/workspace_robo4/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.launching.prefs b/workspace_robo4/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.launching.prefs index ad157cd..4a0e534 100644 --- a/workspace_robo4/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.launching.prefs +++ b/workspace_robo4/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.launching.prefs @@ -1,2 +1,2 @@ eclipse.preferences.version=1 -org.eclipse.jdt.launching.PREF_VM_XML=\r\n\r\n\r\n\r\n\r\n\r\n +org.eclipse.jdt.launching.PREF_VM_XML=\r\n\r\n\r\n\r\n\r\n\r\n diff --git a/workspace_robo4/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.rse.core.prefs b/workspace_robo4/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.rse.core.prefs index 42520fc..0a60e67 100644 --- a/workspace_robo4/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.rse.core.prefs +++ b/workspace_robo4/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.rse.core.prefs @@ -1,3 +1,4 @@ activeuserprofiles=DESKTOP-SHKMAML;Team eclipse.preferences.version=1 org.eclipse.rse.systemtype.local.systemType.defaultUserId=Terrans Force +useridperkey=DESKTOP-SHKMAML.Local\=Terrans Force; diff --git a/workspace_robo4/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi b/workspace_robo4/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi index eed8f32..8c2319f 100644 --- a/workspace_robo4/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi +++ b/workspace_robo4/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi @@ -160,7 +160,7 @@ categoryTag:Java Browsing - + View categoryTag:General @@ -230,52 +230,76 @@ Draggable - - - - - - - - - - - - + + + + + + + + + + + + toolbarSeparator + + Draggable + + + + + Draggable + + + + + + + + + + + + + + + + + Draggable - - - - + + + + Draggable - - - + + + Draggable - - - - + + + + Draggable - - + + Draggable - - + + toolbarSeparator @@ -283,15 +307,15 @@ Draggable - - - - - - - - - + + + + + + + + + toolbarSeparator @@ -303,8 +327,8 @@ Draggable - - + + stretch diff --git a/workspace_robo4/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps b/workspace_robo4/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps index 74059b1df2f73c89d75df802fd4f59c5cb2a45bf..f5666298b590a888c66b2f99be77b3cd4794bc6f 100644 GIT binary patch delta 35 rcmX@ZeujNR81v*w%vMYcMw1m8wFI(?i&OQo5{noZ7(*7%-K+or!(j@& delta 34 qcmX@ZeujNR81v+b%+^c{hLaT;wfM7=Q}wbEix?OfLl#f9>;wR{TM8cl diff --git a/workspace_robo4/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt b/workspace_robo4/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt index 514b305..f84b816 100644 --- a/workspace_robo4/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt +++ b/workspace_robo4/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt @@ -1,28 +1,29 @@ INDEX VERSION 1.126+E:\2016Spring\robocodefiles\download\app\workspace_robo4\.metadata\.plugins\org.eclipse.jdt.core -4256357263.index +3253539546.index 240634369.index -1270703585.index -3837392347.index 3357244662.index +3837392347.index +1270703585.index 743580145.index 4213330522.index -2097671088.index +2815204631.index 972965919.index 649753860.index -2815204631.index +2097671088.index 2394798482.index 1886545541.index 2420224983.index 9299668.index -2816454019.index 2806151389.index -3228954160.index +2816454019.index 2169288515.index +3228954160.index 2122446671.index 2936589608.index +1812437159.index 2690281349.index 3090911769.index 844486800.index 195189658.index 2555277089.index -3253539546.index +4256357263.index diff --git a/workspace_robo4/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat b/workspace_robo4/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat index e8a0a544802bd740a1b3cd89fd455a24b2abcc9f..0facbcd4b9baf082511caf207f299df748e6ab44 100644 GIT binary patch delta 46 zcmexAmGS>n#tp4ryzIV4@j0swbZ B4*~!H delta 48 zcmexAmGS>n#tp4ra$H`aex4!m9{#?rj0_A6`x)4MjpBn`1N?y;h69r)d1*~P>tzH0 DhEfjn diff --git a/workspace_robo4/.metadata/.plugins/org.eclipse.m2e.core/nexus/1a42e2ddbdd28c4e903ebde7bafa5867/segments.gen b/workspace_robo4/.metadata/.plugins/org.eclipse.m2e.core/nexus/1a42e2ddbdd28c4e903ebde7bafa5867/segments.gen index 225a55b3c336e69bb83a6d5e7d3339a5c525e7e1..e9fa6008becd133f1cac4c5cec7f4311c6576acc 100644 GIT binary patch literal 20 QcmezW|NlP*2w;ZM07=&b0ssI2 literal 20 QcmezW|NlP*2w;NI07=aR00000 diff --git a/workspace_robo4/.metadata/.plugins/org.eclipse.m2e.core/nexus/26522e0d83a422eed93329ece7565cfc/segments.gen b/workspace_robo4/.metadata/.plugins/org.eclipse.m2e.core/nexus/26522e0d83a422eed93329ece7565cfc/segments.gen index 225a55b3c336e69bb83a6d5e7d3339a5c525e7e1..e9fa6008becd133f1cac4c5cec7f4311c6576acc 100644 GIT binary patch literal 20 QcmezW|NlP*2w;ZM07=&b0ssI2 literal 20 QcmezW|NlP*2w;NI07=aR00000 diff --git a/workspace_robo4/.metadata/.plugins/org.eclipse.m2e.core/nexus/830bc118332e77292949ed1e6d2fabe0/segments.gen b/workspace_robo4/.metadata/.plugins/org.eclipse.m2e.core/nexus/830bc118332e77292949ed1e6d2fabe0/segments.gen index 225a55b3c336e69bb83a6d5e7d3339a5c525e7e1..e9fa6008becd133f1cac4c5cec7f4311c6576acc 100644 GIT binary patch literal 20 QcmezW|NlP*2w;ZM07=&b0ssI2 literal 20 QcmezW|NlP*2w;NI07=aR00000 diff --git a/workspace_robo4/plugins/dotnet/robocode.dotnet.host/src/main/java/net/sf/robocode/dotnet/host/Module.java b/workspace_robo4/plugins/dotnet/robocode.dotnet.host/src/main/java/net/sf/robocode/dotnet/host/Module.java index 2867a6f..e538d7a 100644 --- a/workspace_robo4/plugins/dotnet/robocode.dotnet.host/src/main/java/net/sf/robocode/dotnet/host/Module.java +++ b/workspace_robo4/plugins/dotnet/robocode.dotnet.host/src/main/java/net/sf/robocode/dotnet/host/Module.java @@ -65,7 +65,7 @@ public class Module extends BaseModule { Container.cache.addComponent("robocode.host.vb", DotNetHost.class); Container.cache.addComponent("robocode.host.dotnet", DotNetHost.class); - } catch (Throwable e) { + } catch (RuntimeException e) { Logger.logError(e); throw new Error("Can't initialize .NET Robocode", e); } diff --git a/workspace_robo4/plugins/dotnet/robocode.dotnet.installer/src/main/java/net/sf/robocode/installer/AutoExtract.java b/workspace_robo4/plugins/dotnet/robocode.dotnet.installer/src/main/java/net/sf/robocode/installer/AutoExtract.java index eaba300..852475f 100644 --- a/workspace_robo4/plugins/dotnet/robocode.dotnet.installer/src/main/java/net/sf/robocode/installer/AutoExtract.java +++ b/workspace_robo4/plugins/dotnet/robocode.dotnet.installer/src/main/java/net/sf/robocode/installer/AutoExtract.java @@ -240,7 +240,7 @@ public class AutoExtract implements ActionListener { // Set native look and feel try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (Throwable t) {// For some reason Ubuntu 7 can cause a NullPointerException when trying to getting the LAF + } catch (RuntimeException t) {// For some reason Ubuntu 7 can cause a NullPointerException when trying to getting the LAF } File suggestedDir; diff --git a/workspace_robo4/plugins/testing/robocode.testing.installer/src/main/java/net/sf/robocode/installer/AutoExtract.java b/workspace_robo4/plugins/testing/robocode.testing.installer/src/main/java/net/sf/robocode/installer/AutoExtract.java index c7825a0..e993cf8 100644 --- a/workspace_robo4/plugins/testing/robocode.testing.installer/src/main/java/net/sf/robocode/installer/AutoExtract.java +++ b/workspace_robo4/plugins/testing/robocode.testing.installer/src/main/java/net/sf/robocode/installer/AutoExtract.java @@ -246,7 +246,7 @@ public class AutoExtract implements ActionListener { // Set native look and feel try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (Throwable t) {// For some reason Ubuntu 7 can cause a NullPointerException when trying to getting the LAF + } catch (RuntimeException t) {// For some reason Ubuntu 7 can cause a NullPointerException when trying to getting the LAF } File installDir = null; 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 2616238..184001c 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 @@ -113,7 +113,7 @@ public class HiddenAccess { System.exit(-1); } catch (MalformedURLException e) { Logger.logError(e); - } catch (Error e) { + } catch (MyException e) { Logger.logError(e); throw e; } diff --git a/workspace_robo4/robocode.core/src/main/java/net/sf/robocode/battle/events/BattleEventDispatcher.java b/workspace_robo4/robocode.core/src/main/java/net/sf/robocode/battle/events/BattleEventDispatcher.java index c6a146f..9155e67 100644 --- a/workspace_robo4/robocode.core/src/main/java/net/sf/robocode/battle/events/BattleEventDispatcher.java +++ b/workspace_robo4/robocode.core/src/main/java/net/sf/robocode/battle/events/BattleEventDispatcher.java @@ -46,7 +46,7 @@ public class BattleEventDispatcher implements IBattleListener { for (IBattleListener listener : listeners) { try { listener.onBattleStarted(event); - } catch (Throwable ex) { + } catch (RuntimeException ex) { logError("onBattleStarted " + listener.getClass(), ex); } } @@ -56,7 +56,7 @@ public class BattleEventDispatcher implements IBattleListener { for (IBattleListener listener : listeners) { try { listener.onBattleCompleted(event); - } catch (Throwable ex) { + } catch (RuntimeException ex) { logError("onBattleCompleted " + listener.getClass(), ex); } } @@ -66,7 +66,7 @@ public class BattleEventDispatcher implements IBattleListener { for (IBattleListener listener : listeners) { try { listener.onBattleFinished(event); - } catch (Throwable ex) { + } catch (RuntimeException ex) { logError("onBattleFinished " + listener.getClass(), ex); } } @@ -76,7 +76,7 @@ public class BattleEventDispatcher implements IBattleListener { for (IBattleListener listener : listeners) { try { listener.onBattlePaused(event); - } catch (Throwable ex) { + } catch (RuntimeException ex) { logError("onBattlePaused " + listener.getClass(), ex); } } @@ -86,7 +86,7 @@ public class BattleEventDispatcher implements IBattleListener { for (IBattleListener listener : listeners) { try { listener.onBattleResumed(event); - } catch (Throwable ex) { + } catch (RuntimeException ex) { logError("onBattleResumed " + listener.getClass(), ex); } } @@ -96,7 +96,7 @@ public class BattleEventDispatcher implements IBattleListener { for (IBattleListener listener : listeners) { try { listener.onRoundStarted(event); - } catch (Throwable ex) { + } catch (RuntimeException ex) { logError("onRoundStarted " + listener.getClass(), ex); } } @@ -106,7 +106,7 @@ public class BattleEventDispatcher implements IBattleListener { for (IBattleListener listener : listeners) { try { listener.onRoundEnded(event); - } catch (Throwable ex) { + } catch (RuntimeException ex) { logError("onRoundEnded " + listener.getClass(), ex); } } @@ -116,7 +116,7 @@ public class BattleEventDispatcher implements IBattleListener { for (IBattleListener listener : listeners) { try { listener.onTurnStarted(event); - } catch (Throwable ex) { + } catch (RuntimeException ex) { logError("onTurnStarted " + listener.getClass(), ex); } } @@ -126,7 +126,7 @@ public class BattleEventDispatcher implements IBattleListener { for (IBattleListener listener : listeners) { try { listener.onTurnEnded(event); - } catch (Throwable ex) { + } catch (RuntimeException ex) { logError("onTurnEnded " + listener.getClass(), ex); } } @@ -136,7 +136,7 @@ public class BattleEventDispatcher implements IBattleListener { for (IBattleListener listener : listeners) { try { listener.onBattleMessage(event); - } catch (Throwable ex) { + } catch (RuntimeException ex) { logError("onBattleMessage " + listener.getClass(), ex); } } @@ -146,7 +146,7 @@ public class BattleEventDispatcher implements IBattleListener { for (IBattleListener listener : listeners) { try { listener.onBattleError(event); - } catch (Throwable ex) { + } catch (RuntimeException ex) { Logger.realErr.println(listener.getClass() + " " + ex.getMessage()); } } diff --git a/workspace_robo4/robocode.core/src/main/java/net/sf/robocode/core/RobocodeMain.java b/workspace_robo4/robocode.core/src/main/java/net/sf/robocode/core/RobocodeMain.java index 24c831b..3ba5a93 100644 --- a/workspace_robo4/robocode.core/src/main/java/net/sf/robocode/core/RobocodeMain.java +++ b/workspace_robo4/robocode.core/src/main/java/net/sf/robocode/core/RobocodeMain.java @@ -171,7 +171,7 @@ public final class RobocodeMain extends RobocodeMainBase { System.exit(8); } } - } catch (Throwable e) { + } catch (RuntimeException e) { Logger.logError(e); } } diff --git a/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/JavaHost.java b/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/JavaHost.java index 3540256..7dde1e9 100644 --- a/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/JavaHost.java +++ b/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/JavaHost.java @@ -88,7 +88,7 @@ public class JavaHost implements IHost { } return checkInterfaces(robotClass, robotItem); - } catch (Throwable t) { + } catch (RuntimeException t) { if (message) { logError("Got an error with " + robotItem.getFullClassName() + ": " + t); // just message here if (t.getMessage() != null && t.getMessage().contains("Bad version number in .class file")) { diff --git a/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/events/EventManager.java b/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/events/EventManager.java index 0024a6b..5621c87 100644 --- a/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/events/EventManager.java +++ b/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/events/EventManager.java @@ -382,7 +382,7 @@ public final class EventManager implements IEventManager { } catch (RuntimeException e) { currentTopEvent = null; throw e; - } catch (Error e) { + } catch (MyException e) { currentTopEvent = null; throw e; } finally { diff --git a/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/proxies/HostingRobotProxy.java b/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/proxies/HostingRobotProxy.java index df5d591..9fdb31e 100644 --- a/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/proxies/HostingRobotProxy.java +++ b/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/proxies/HostingRobotProxy.java @@ -157,7 +157,7 @@ abstract class HostingRobotProxy implements IHostingRobotProxy, IHostedThread { private void loadClassBattle() { try { robotClassLoader.loadRobotMainClass(true); - } catch (Throwable e) { + } catch (RuntimeException e) { println("SYSTEM: Could not load " + statics.getName() + " : "); println(e); drainEnergy(); @@ -183,7 +183,7 @@ abstract class HostingRobotProxy implements IHostingRobotProxy, IHostedThread { robot = null; logError(e); return false; - } catch (Throwable e) { + } catch (RuntimeException e) { println("SYSTEM: An error occurred during initialization of " + statics.getName()); println("SYSTEM: " + e); println(e); @@ -247,7 +247,7 @@ abstract class HostingRobotProxy implements IHostingRobotProxy, IHostedThread { println(e); logMessage(statics.getName() + " stopped successfully."); throw e; // must be re-thrown in order to stop the thread - } catch (Throwable t) { + } catch (RuntimeException t) { drainEnergy(); println(t); logMessage(statics.getName() + ": Throwable: " + t); // without stack here diff --git a/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/security/RobotClassLoader.java b/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/security/RobotClassLoader.java index 69dad86..0993839 100644 --- a/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/security/RobotClassLoader.java +++ b/workspace_robo4/robocode.host/src/main/java/net/sf/robocode/host/security/RobotClassLoader.java @@ -244,7 +244,7 @@ public class RobotClassLoader extends URLClassLoader implements IRobotClassLoade } else { warnIfStaticRobotInstanceFields(); } - } catch (Throwable e) { + } catch (RuntimeException e) { robotClass = null; throw new ClassNotFoundException(e.getMessage(), e); } @@ -289,7 +289,7 @@ public class RobotClassLoader extends URLClassLoader implements IRobotClassLoade } } } - } catch (Throwable t) { + } catch (RuntimeException t) { Logger.logError(t); } } @@ -305,7 +305,7 @@ public class RobotClassLoader extends URLClassLoader implements IRobotClassLoade Class type = null; try { type = loadRobotClassLocaly(className, false); - } catch (Throwable t) { + } catch (RuntimeException t) { continue; } if (type != null) { @@ -366,7 +366,7 @@ public class RobotClassLoader extends URLClassLoader implements IRobotClassLoade modifiersField.setInt(field, modifiers & ~Modifier.FINAL); // Remove the FINAL modifier field.set(null, null); - } catch (Throwable ignore) {} + } catch (RuntimeException ignore) {} } /** @@ -383,7 +383,7 @@ public class RobotClassLoader extends URLClassLoader implements IRobotClassLoade for (Field field: type.getDeclaredFields()) { fields.add(field); } - } catch (Throwable ignore) {// NoClassDefFoundError does occur with some robots, e.g. sgp.Drunken [1.12] + } catch (RuntimeException ignore) {// NoClassDefFoundError does occur with some robots, e.g. sgp.Drunken [1.12] // We ignore all exceptions and errors here so we can proceed to retrieve // field from super classes. } diff --git a/workspace_robo4/robocode.installer/src/main/java/net/sf/robocode/installer/AutoExtract.java b/workspace_robo4/robocode.installer/src/main/java/net/sf/robocode/installer/AutoExtract.java index 581a88e..e4c6d0a 100644 --- a/workspace_robo4/robocode.installer/src/main/java/net/sf/robocode/installer/AutoExtract.java +++ b/workspace_robo4/robocode.installer/src/main/java/net/sf/robocode/installer/AutoExtract.java @@ -337,7 +337,7 @@ public class AutoExtract implements ActionListener { // Set native look and feel try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (Throwable t) {// For some reason Ubuntu 7 can cause a NullPointerException when trying to getting the LAF + } catch (RuntimeException t) {// For some reason Ubuntu 7 can cause a NullPointerException when trying to getting the LAF } AutoExtract extractor = new AutoExtract(); diff --git a/workspace_robo4/robocode.roborumble/src/main/java/net/sf/robocode/roborumble/netengine/FileTransfer.java b/workspace_robo4/robocode.roborumble/src/main/java/net/sf/robocode/roborumble/netengine/FileTransfer.java index c686e5a..09004c4 100644 --- a/workspace_robo4/robocode.roborumble/src/main/java/net/sf/robocode/roborumble/netengine/FileTransfer.java +++ b/workspace_robo4/robocode.roborumble/src/main/java/net/sf/robocode/roborumble/netengine/FileTransfer.java @@ -204,7 +204,7 @@ public class FileTransfer { if (conn != null) { conn.disconnect(); } - } catch (Throwable ignore) {// we expect this, right ? + } catch (RuntimeException ignore) {// we expect this, right ? } } } diff --git a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/AwtAttack.java b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/AwtAttack.java index 35c4ff8..5722779 100644 --- a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/AwtAttack.java +++ b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/AwtAttack.java @@ -54,7 +54,7 @@ public class AwtAttack extends AdvancedRobot { }; javax.swing.SwingUtilities.invokeLater(doHack); - } catch (Throwable e) { + } catch (RuntimeException e) { // swalow security exception e.printStackTrace(out); } @@ -75,7 +75,7 @@ public class AwtAttack extends AdvancedRobot { e.printStackTrace(out); } catch (IOException e) { e.printStackTrace(out); - } catch (Throwable e) { + } catch (RuntimeException e) { // swalow security exception e.printStackTrace(out); } diff --git a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ConstructorAwtAttack.java b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ConstructorAwtAttack.java index 97bc321..47ae244 100644 --- a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ConstructorAwtAttack.java +++ b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ConstructorAwtAttack.java @@ -39,7 +39,7 @@ public class ConstructorAwtAttack extends robocode.AdvancedRobot { }; javax.swing.SwingUtilities.invokeLater(doHack); - } catch (Throwable e) { + } catch (RuntimeException e) { // swallow security exception e.printStackTrace(out); } @@ -60,7 +60,7 @@ public class ConstructorAwtAttack extends robocode.AdvancedRobot { e.printStackTrace(out); } catch (IOException e) { e.printStackTrace(out); - } catch (Throwable e) { + } catch (RuntimeException e) { // swallow security exception e.printStackTrace(out); } diff --git a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ConstructorThreadAttack.java b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ConstructorThreadAttack.java index a0c1e4a..0c5a0f8 100644 --- a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ConstructorThreadAttack.java +++ b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ConstructorThreadAttack.java @@ -24,7 +24,7 @@ public class ConstructorThreadAttack extends robocode.AdvancedRobot { Thread t = new Thread(a); t.start(); - } catch (Throwable e) { + } catch (RuntimeException e) { // swallow security exception e.printStackTrace(out); } @@ -39,7 +39,7 @@ public class ConstructorThreadAttack extends robocode.AdvancedRobot { Thread t = new Thread(tg, a); t.start(); - } catch (Throwable e) { + } catch (RuntimeException e) { // swallow security exception e.printStackTrace(out); } diff --git a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/FileAttack.java b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/FileAttack.java index 3a35cec..9f76ccf 100644 --- a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/FileAttack.java +++ b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/FileAttack.java @@ -52,7 +52,7 @@ public class FileAttack extends AdvancedRobot { e.printStackTrace(out); } catch (IOException e) { e.printStackTrace(out); - } catch (Throwable e) { + } catch (RuntimeException e) { // swalow security exception e.printStackTrace(out); } @@ -72,7 +72,7 @@ public class FileAttack extends AdvancedRobot { e.printStackTrace(out); } catch (IOException e) { e.printStackTrace(out); - } catch (Throwable e) { + } catch (RuntimeException e) { // swalow security exception e.printStackTrace(out); } diff --git a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/IncludeNamespaceAttack.java b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/IncludeNamespaceAttack.java index d2cb8e1..c5ecdb9 100644 --- a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/IncludeNamespaceAttack.java +++ b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/IncludeNamespaceAttack.java @@ -37,7 +37,7 @@ public class IncludeNamespaceAttack extends AdvancedRobot { private void namespaceAttack() { try { HiddenAccess.createRules(10, 10, 10, 10, 1, false, 100); - } catch (Throwable e) { + } catch (RuntimeException e) { // Swallow security exception e.printStackTrace(out); } diff --git a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ThreadAttack.java b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ThreadAttack.java index 84cd88f..bb21f8c 100644 --- a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ThreadAttack.java +++ b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ThreadAttack.java @@ -42,7 +42,7 @@ public class ThreadAttack extends AdvancedRobot { Thread t = new Thread(a); t.start(); - } catch (Throwable e) { + } catch (RuntimeException e) { // swallow security exception e.printStackTrace(out); } @@ -57,7 +57,7 @@ public class ThreadAttack extends AdvancedRobot { Thread t = new Thread(tg, a); t.start(); - } catch (Throwable e) { + } catch (RuntimeException e) { // swallow security exception e.printStackTrace(out); } diff --git a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ThreadGroupAttack.java b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ThreadGroupAttack.java index dbf59ec..963b549 100644 --- a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ThreadGroupAttack.java +++ b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/ThreadGroupAttack.java @@ -51,7 +51,7 @@ public class ThreadGroupAttack extends Robot { } } }).start(); - } catch (Throwable t) { + } catch (RuntimeException t) { t.printStackTrace(out); } } diff --git a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/UndeadThread.java b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/UndeadThread.java index 94b042c..75fcbfa 100644 --- a/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/UndeadThread.java +++ b/workspace_robo4/robocode.tests.robots/src/main/java/tested/robots/UndeadThread.java @@ -23,7 +23,7 @@ public class UndeadThread extends AdvancedRobot { while (true) { try { body(); - } catch (Throwable t) { + } catch (RuntimeException t) { // spamming the console out.println("Swalowed it, HA HA HA HA HAAAAA !!!!!"); out.println(t); diff --git a/workspace_robo4/robocode.tests/src/main/java/net/sf/robocode/test/helpers/Assert.java b/workspace_robo4/robocode.tests/src/main/java/net/sf/robocode/test/helpers/Assert.java index 6f5fded..27c29dd 100644 --- a/workspace_robo4/robocode.tests/src/main/java/net/sf/robocode/test/helpers/Assert.java +++ b/workspace_robo4/robocode.tests/src/main/java/net/sf/robocode/test/helpers/Assert.java @@ -22,7 +22,7 @@ public class Assert extends org.junit.Assert { public static void allAssertNear(double v1, double v2) { try { assertNear(v1, v2); - } catch (Throwable ex) { + } catch (RuntimeException ex) { ex.printStackTrace(System.err); } } @@ -30,7 +30,7 @@ public class Assert extends org.junit.Assert { public static void allAssertThat(T t, org.hamcrest.Matcher tMatcher) { try { org.junit.Assert.assertThat(t, tMatcher); - } catch (Throwable ex) { + } catch (RuntimeException ex) { ex.printStackTrace(System.err); } } diff --git a/workspace_robo4/robocode.ui.editor/src/main/java/net/sf/robocode/ui/editor/EditWindow.java b/workspace_robo4/robocode.ui.editor/src/main/java/net/sf/robocode/ui/editor/EditWindow.java index 4986b8b..a0f8e9b 100644 --- a/workspace_robo4/robocode.ui.editor/src/main/java/net/sf/robocode/ui/editor/EditWindow.java +++ b/workspace_robo4/robocode.ui.editor/src/main/java/net/sf/robocode/ui/editor/EditWindow.java @@ -146,7 +146,7 @@ public class EditWindow extends JInternalFrame { setModified(editorPanel.getEditorPane().isModified()); } }); - } catch (Throwable e) { + } catch (RuntimeException e) { Logger.logError(e); } } diff --git a/workspace_robo4/robocode.ui.editor/src/main/java/net/sf/robocode/ui/editor/WindowMenuItem.java b/workspace_robo4/robocode.ui.editor/src/main/java/net/sf/robocode/ui/editor/WindowMenuItem.java index 1baec07..bda1627 100644 --- a/workspace_robo4/robocode.ui.editor/src/main/java/net/sf/robocode/ui/editor/WindowMenuItem.java +++ b/workspace_robo4/robocode.ui.editor/src/main/java/net/sf/robocode/ui/editor/WindowMenuItem.java @@ -74,7 +74,7 @@ public class WindowMenuItem extends JCheckBoxMenuItem implements ActionListener if (window.isIcon()) { try { window.setIcon(false); - } catch (Throwable ignored) {} + } catch (RuntimeException ignored) {} } if (window.getDesktopPane() != null) { window.getDesktopPane().setSelectedFrame(window); @@ -83,7 +83,7 @@ public class WindowMenuItem extends JCheckBoxMenuItem implements ActionListener window.grabFocus(); try { window.setSelected(true); - } catch (Throwable ignored) {} + } catch (RuntimeException ignored) {} } /** diff --git a/workspace_robo4/robocode.ui/src/main/java/net/sf/robocode/ui/WindowManager.java b/workspace_robo4/robocode.ui/src/main/java/net/sf/robocode/ui/WindowManager.java index 476bc5b..bbdae95 100644 --- a/workspace_robo4/robocode.ui/src/main/java/net/sf/robocode/ui/WindowManager.java +++ b/workspace_robo4/robocode.ui/src/main/java/net/sf/robocode/ui/WindowManager.java @@ -574,14 +574,14 @@ public class WindowManager implements IWindowManagerExt { private void setLookAndFeel() { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (Throwable t) { + } catch (RuntimeException t) { // Work-around for problems with setting Look and Feel described here: // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6468089 Locale.setDefault(Locale.US); try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (Throwable t2) { + } catch (RuntimeException t2) { // For some reason Ubuntu 7 can cause a NullPointerException when trying to getting the LAF System.err.println("Could not set the Look and Feel (LAF). The default LAF is used instead"); } diff --git a/workspace_robo4/robocode.ui/src/main/java/net/sf/robocode/ui/battle/AwtBattleAdaptor.java b/workspace_robo4/robocode.ui/src/main/java/net/sf/robocode/ui/battle/AwtBattleAdaptor.java index bfb479c..11436ae 100644 --- a/workspace_robo4/robocode.ui/src/main/java/net/sf/robocode/ui/battle/AwtBattleAdaptor.java +++ b/workspace_robo4/robocode.ui/src/main/java/net/sf/robocode/ui/battle/AwtBattleAdaptor.java @@ -132,7 +132,7 @@ public final class AwtBattleAdaptor { calculateFPS(); } } - } catch (Throwable t) { + } catch (RuntimeException t) { Logger.logError(t); } }