diff options
author | Markus Keller | 2014-07-29 14:36:11 +0000 |
---|---|---|
committer | Markus Keller | 2014-07-29 14:36:11 +0000 |
commit | 9b7a8bc5f77cadd15bd04932132e25fc4c1a02c1 (patch) | |
tree | 42ce84b24dfc50256295dc9277be8f3b6453322e /bundles/org.eclipse.equinox.console | |
parent | 64ee606790cc65da288a0265829e454ac5fda8e6 (diff) | |
download | rt.equinox.bundles-9b7a8bc5f77cadd15bd04932132e25fc4c1a02c1.tar.gz rt.equinox.bundles-9b7a8bc5f77cadd15bd04932132e25fc4c1a02c1.tar.xz rt.equinox.bundles-9b7a8bc5f77cadd15bd04932132e25fc4c1a02c1.zip |
Bug 440656: [console] "threads stop main" doesn't work any more in JDK 8
Diffstat (limited to 'bundles/org.eclipse.equinox.console')
-rwxr-xr-x | bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java index 57f60c334..bfb11f88a 100755 --- a/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java +++ b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java @@ -1441,7 +1441,14 @@ public class EquinoxCommandProvider implements SynchronousBundleListener { // Set the stack trace to that of the target thread. toThrow.setStackTrace(t.getStackTrace()); // Stop the thread using the specified throwable. - t.stop(toThrow); + try { + t.stop(toThrow); + } catch (UnsupportedOperationException e) { + // Thread#stop(Throwable) doesn't work any more in JDK 8. Try stop0: + Method stop0 = Thread.class.getDeclaredMethod("stop0", Object.class); + stop0.setAccessible(true); + stop0.invoke(t, toThrow); + } return; } // An unrecognized action was specified. |