Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2014-07-29 14:36:11 +0000
committerMarkus Keller2014-07-29 14:36:11 +0000
commit9b7a8bc5f77cadd15bd04932132e25fc4c1a02c1 (patch)
tree42ce84b24dfc50256295dc9277be8f3b6453322e /bundles/org.eclipse.equinox.console
parent64ee606790cc65da288a0265829e454ac5fda8e6 (diff)
downloadrt.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-xbundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java9
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.

Back to the top