7081804: Remove cause field from javax.xml.crypto.NoSuchMechnismException

Sebastian Sickelmann sebastian.sickelmann at gmx.de
Thu Aug 25 22:03:56 UTC 2011


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



More information about the security-dev mailing list