Commit b5abfc23 by Jeroen Frijters Committed by Michael Koch

Proxy.java, [...]: Don't catch java.lang.ThreadDeath.

2005-02-22  Jeroen Frijters  <jeroen@frijters.net>

	* java/lang/reflect/Proxy.java,
	java/net/URL.java,
	java/security/SecureRandom.java,
	java/util/Timer.java,
	java/util/prefs/AbstractPreferences.java:
	Don't catch java.lang.ThreadDeath.

From-SVN: r95415
parent 19b3ffbc
2005-02-22 Jeroen Frijters <jeroen@frijters.net>
* java/lang/reflect/Proxy.java,
java/net/URL.java,
java/security/SecureRandom.java,
java/util/Timer.java,
java/util/prefs/AbstractPreferences.java:
Don't catch java.lang.ThreadDeath.
2005-02-22 David Gilbert <david.gilbert@object-refinery.com>
* java/awt/font/TransformAttribute.java,
......
......@@ -1347,7 +1347,7 @@ public class Proxy implements Serializable
return clazz;
}
catch (Throwable e)
catch (Exception e)
{
// assert false;
throw (Error) new InternalError("Unexpected: " + e).initCause(e);
......
/* URL.java -- Uniform Resource Locator Class
Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004
Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GNU Classpath.
......@@ -918,6 +918,10 @@ public final class URL implements Serializable
Class c = Class.forName(clsName, true, systemClassLoader);
ph = (URLStreamHandler) c.newInstance();
}
catch (ThreadDeath death)
{
throw death;
}
catch (Throwable t) { /* ignored */ }
}
while (ph == null && pkgPrefix.hasMoreTokens());
......
......@@ -112,6 +112,10 @@ public class SecureRandom extends Random
provider = p[i];
return;
}
catch (ThreadDeath death)
{
throw death;
}
catch (Throwable t)
{
// Ignore.
......
......@@ -343,6 +343,12 @@ public class Timer
{
task.run();
}
catch (ThreadDeath death)
{
// If an exception escapes, the Timer becomes invalid.
queue.stop();
throw death;
}
catch (Throwable t)
{
/* ignore all errors */
......
......@@ -550,6 +550,8 @@ public abstract class AbstractPreferences extends Preferences {
String value;
try {
value = getSpi(key);
} catch (ThreadDeath death) {
throw death;
} catch (Throwable t) {
value = null;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment