diff options
author | Narayan Kamath <narayan@google.com> | 2015-04-22 10:42:30 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-04-22 10:42:30 +0000 |
commit | 10135db6f26a8438351f4674f39821c05da5c694 (patch) | |
tree | 7023cc985dc8ce67d3aa5b3a9d037c1b79ea1e72 /luni | |
parent | 6218582a10d9ad41f7a681c57301c83acebd5dc9 (diff) | |
parent | 9cd55497d16cc2d8888dd204b5b63ace0645fa06 (diff) | |
download | libcore-10135db6f26a8438351f4674f39821c05da5c694.zip libcore-10135db6f26a8438351f4674f39821c05da5c694.tar.gz libcore-10135db6f26a8438351f4674f39821c05da5c694.tar.bz2 |
am 9cd55497: am 298bf64c: Merge "X509Certificate: Narrow down the scope of caught exceptions."
* commit '9cd55497d16cc2d8888dd204b5b63ace0645fa06':
X509Certificate: Narrow down the scope of caught exceptions.
Diffstat (limited to 'luni')
-rw-r--r-- | luni/src/main/java/javax/security/cert/X509Certificate.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/luni/src/main/java/javax/security/cert/X509Certificate.java b/luni/src/main/java/javax/security/cert/X509Certificate.java index e85a556..5084ae0 100644 --- a/luni/src/main/java/javax/security/cert/X509Certificate.java +++ b/luni/src/main/java/javax/security/cert/X509Certificate.java @@ -51,7 +51,7 @@ public abstract class X509Certificate extends Certificate { String classname = Security.getProperty("cert.provider.x509v1"); Class cl = Class.forName(classname); constructor = cl.getConstructor(new Class[] {InputStream.class}); - } catch (Throwable e) { + } catch (Exception|LinkageError e) { } } @@ -80,7 +80,7 @@ public abstract class X509Certificate extends Certificate { try { return (X509Certificate) constructor.newInstance(new Object[] {inStream}); - } catch (Throwable e) { + } catch (ReflectiveOperationException e) { throw new CertificateException(e.getMessage()); } } |