8264148: Update spec for exceptions retrofitted for exception chaining

Reviewed-by: rriggs, smarks
This commit is contained in:
Joe Darcy 2021-03-30 19:59:59 +00:00
parent 353807c5f1
commit 815248ab27
22 changed files with 40 additions and 76 deletions

View file

@ -765,7 +765,7 @@ public class PolicyFile extends java.security.Policy {
}
} catch (java.lang.reflect.InvocationTargetException ite) {
Object[] source = {pe.permission,
ite.getTargetException().toString()};
ite.getCause().toString()};
System.err.println(
LocalizedMessage.getNonlocalized(
POLICY + ".error.adding.Permission.perm.message",

View file

@ -127,7 +127,7 @@ public class CRLExtensions {
throw new CRLException("Duplicate extensions not allowed");
}
} catch (InvocationTargetException invk) {
throw new CRLException(invk.getTargetException().getMessage());
throw new CRLException(invk.getCause().getMessage());
} catch (Exception e) {
throw new CRLException(e.toString());
}

View file

@ -115,7 +115,7 @@ public class CertificateExtensions implements CertAttrSet<Extension> {
throw new IOException("Duplicate extensions not allowed");
}
} catch (InvocationTargetException invk) {
Throwable e = invk.getTargetException();
Throwable e = invk.getCause();
if (ext.isCritical() == false) {
// ignore errors parsing non-critical extensions
if (unparseableExtensions == null) {