Author: kkolinko Date: Sun Nov 13 21:51:18 2011 New Revision: 1201521 URL: http://svn.apache.org/viewvc?rev=1201521&view=rev Log: javax.el: Improve processing of errors that are wrapped into InvocationTargetException. Rethrow errors that must be rethrown.
Modified: tomcat/trunk/java/javax/el/BeanELResolver.java tomcat/trunk/java/javax/el/ExpressionFactory.java Modified: tomcat/trunk/java/javax/el/BeanELResolver.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/BeanELResolver.java?rev=1201521&r1=1201520&r2=1201521&view=diff ============================================================================== --- tomcat/trunk/java/javax/el/BeanELResolver.java (original) +++ tomcat/trunk/java/javax/el/BeanELResolver.java Sun Nov 13 21:51:18 2011 @@ -88,9 +88,16 @@ public class BeanELResolver extends ELRe } catch (IllegalAccessException e) { throw new ELException(e); } catch (InvocationTargetException e) { + Throwable cause = e.getCause(); + if (cause instanceof ThreadDeath) { + throw (ThreadDeath) cause; + } + if (cause instanceof VirtualMachineError) { + throw (VirtualMachineError) cause; + } throw new ELException(message(context, "propertyReadError", new Object[] { base.getClass().getName(), - property.toString() }), e.getCause()); + property.toString() }), cause); } catch (Exception e) { throw new ELException(e); } @@ -136,9 +143,16 @@ public class BeanELResolver extends ELRe } catch (IllegalAccessException e) { throw new ELException(e); } catch (InvocationTargetException e) { + Throwable cause = e.getCause(); + if (cause instanceof ThreadDeath) { + throw (ThreadDeath) cause; + } + if (cause instanceof VirtualMachineError) { + throw (VirtualMachineError) cause; + } throw new ELException(message(context, "propertyWriteError", new Object[] { base.getClass().getName(), - property.toString() }), e.getCause()); + property.toString() }), cause); } catch (Exception e) { throw new ELException(e); } @@ -473,7 +487,14 @@ public class BeanELResolver extends ELRe } catch (IllegalAccessException e) { throw new ELException(e); } catch (InvocationTargetException e) { - throw new ELException(e.getCause()); + Throwable cause = e.getCause(); + if (cause instanceof ThreadDeath) { + throw (ThreadDeath) cause; + } + if (cause instanceof VirtualMachineError) { + throw (VirtualMachineError) cause; + } + throw new ELException(cause); } context.setPropertyResolved(true); Modified: tomcat/trunk/java/javax/el/ExpressionFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ExpressionFactory.java?rev=1201521&r1=1201520&r2=1201521&view=diff ============================================================================== --- tomcat/trunk/java/javax/el/ExpressionFactory.java (original) +++ tomcat/trunk/java/javax/el/ExpressionFactory.java Sun Nov 13 21:51:18 2011 @@ -200,6 +200,13 @@ public abstract class ExpressionFactory "Unable to create ExpressionFactory of type: " + className, e); } catch (InvocationTargetException e) { + Throwable cause = e.getCause(); + if (cause instanceof ThreadDeath) { + throw (ThreadDeath) cause; + } + if (cause instanceof VirtualMachineError) { + throw (VirtualMachineError) cause; + } throw new ELException( "Unable to create ExpressionFactory of type: " + className, e); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org