7081804: Remove cause field from javax.xml.crypto.NoSuchMechnismException
Sebastian Sickelmann
sebastian.sickelmann at gmx.de
Thu Aug 25 22:24:16 UTC 2011
Am 26.08.2011 00:03, schrieb Sebastian Sickelmann:
> I have found more places in jdk source where an Exception has a
> private cause field.
>
> share/classes/javax/management/remote/JMXProviderException.java:
> private Throwable cause = null;
> share/classes/javax/xml/crypto/KeySelectorException.java: private
> Throwable cause;
> share/classes/javax/xml/crypto/NoSuchMechanismException.java:
> private Throwable cause;
> share/classes/javax/xml/crypto/MarshalException.java: private
> Throwable cause;
> share/classes/javax/xml/crypto/dsig/XMLSignatureException.java:
> private Throwable cause;
> share/classes/javax/xml/crypto/dsig/TransformException.java:
> private Throwable cause;
> share/classes/javax/xml/crypto/URIReferenceException.java: private
> Throwable cause;
>
> 7081804 handles NoSuchMechanismException.
> Is there a way to expand it to at least the xml/crypto/**/* Exceptions?
> JMXProviderException should be fine too.
>
> I would create a CR for the changes to me made to change and test this.
> Would it be good to have some utility-code in Throwable to don't
> introduce to much code-duplication?
>
> -- Sebastian
After a very quick analysis i think i found more candidates for removing
private causes.
share/classes/javax/security/sasl/SaslException.java: private
Throwable _exception;
share/classes/java/lang/reflect/UndeclaredThrowableException.java:
private Throwable undeclaredThrowable;
share/classes/java/lang/reflect/InvocationTargetException.java:
private Throwable target;
share/classes/java/lang/ClassNotFoundException.java: private
Throwable ex;
share/classes/com/sun/java/browser/dom/DOMAccessException.java:
private Throwable ex;
share/classes/com/sun/java/browser/dom/DOMUnsupportedException.java:
private Throwable ex;
share/classes/javax/naming/NamingException.java: protected Throwable
rootException = null;
share/classes/java/rmi/RemoteException.java: public Throwable detail;
share/classes/java/rmi/activation/ActivationException.java: public
Throwable detail;
Some of them need deeper inspection. Some of them are the same as the
above noted Exceptions in xml/crypto package.
- Sebastian
More information about the security-dev
mailing list