# HG changeset patch # User malenkov # Date 1215602738 -14400 # Node ID f58fc9f575e3b0727a24d50ca282ee6216a74ba3 # Parent 09ac82fafd79f6d04e16a7096417043a4d80c0cf 6351692: catch(Throwable) in java.beans.MetaData preventing thread shutdown Reviewed-by: peterz, loneid diff -r 09ac82fafd79 -r f58fc9f575e3 jdk/src/share/classes/java/beans/DefaultPersistenceDelegate.java --- a/jdk/src/share/classes/java/beans/DefaultPersistenceDelegate.java Tue Jul 08 16:40:38 2008 +0400 +++ b/jdk/src/share/classes/java/beans/DefaultPersistenceDelegate.java Wed Jul 09 15:25:38 2008 +0400 @@ -298,7 +298,7 @@ oldL = (EventListener[])MethodUtil.invoke(m, oldInstance, new Object[]{}); newL = (EventListener[])MethodUtil.invoke(m, newInstance, new Object[]{}); } - catch (Throwable e2) { + catch (Exception e2) { try { Method m = type.getMethod("getListeners", new Class[]{Class.class}); oldL = (EventListener[])MethodUtil.invoke(m, oldInstance, new Object[]{listenerType}); diff -r 09ac82fafd79 -r f58fc9f575e3 jdk/src/share/classes/java/beans/EventHandler.java --- a/jdk/src/share/classes/java/beans/EventHandler.java Tue Jul 08 16:40:38 2008 +0400 +++ b/jdk/src/share/classes/java/beans/EventHandler.java Wed Jul 09 15:25:38 2008 +0400 @@ -404,7 +404,7 @@ Object newTarget = MethodUtil.invoke(getter, target, new Object[]{}); return applyGetters(newTarget, rest); } - catch (Throwable e) { + catch (Exception e) { throw new RuntimeException("Failed to call method: " + first + " on " + target, e); }