Details
-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
21.0.0.Final
-
None
Description
The Class
https://github.com/wildfly/wildfly/blob/master/webservices/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java has a central method handleInvocationException to deal with exceptions.
Currently security exceptions are caught and wrapped into a InvocationTargetException.
The proposed solution is to rethrow it.
protected void handleInvocationException(final Throwable t) throws Exception { if (t instanceof MBeanException) { throw ((MBeanException) t).getTargetException(); } if (t instanceof Exception) { if (t instanceof InvocationTargetException) { throw (Exception) t; } else if (t instanceof SecurityException) { throw (Exception) t; } else { SOAPFaultException ex = findSoapFaultException(t); if (ex != null) { throw new InvocationTargetException(ex); } throw new InvocationTargetException(t); } } if (t instanceof Error) { throw (Error) t; } throw new UndeclaredThrowableException(t); }
This is a pre-step to analyse and fix WFLY-14039