From f1b1846249458e8b583b407f674fec541c4f6869 Mon Sep 17 00:00:00 2001 From: Andreas Tobler Date: Tue, 21 Sep 2004 17:30:20 +0200 Subject: [PATCH] 2004-09-21 Casey Marshall * java/security/cert/X509CRLSelector.java: (match): remove unreachable try-catch clauses. Reported by: Dalibor Topic From-SVN: r87805 --- libjava/ChangeLog | 12 ++++ .../java/security/cert/X509CRLSelector.java | 56 +++++++------------ 2 files changed, 33 insertions(+), 35 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index c27d6ee96bb..0e6212683a0 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,15 @@ +2004-09-21 Casey Marshall + + * java/security/cert/X509CRLSelector.java: + (match): remove unreachable try-catch clauses. + Reported by: Dalibor Topic + +2004-09-21 Mark Wielaard + + * java/util/TreeMap.java (root): Don't initialize. + (TreeMap(Comparator)): Call fabricateTree(0). + (fabricateTree): Initialize root and size when count is 0. + 2004-09-21 Sven de Marothy * java/nio/ByteBuffer.java (hashCode): Implemented. diff --git a/libjava/java/security/cert/X509CRLSelector.java b/libjava/java/security/cert/X509CRLSelector.java index 3264e469e2e..a59791e6759 100644 --- a/libjava/java/security/cert/X509CRLSelector.java +++ b/libjava/java/security/cert/X509CRLSelector.java @@ -378,7 +378,26 @@ public class X509CRLSelector implements CRLSelector, Cloneable BigInteger crlNumber = null; if (maxCrlNumber != null) { + byte[] b = crl.getExtensionValue(CRL_NUMBER_ID); + if (b == null) + return false; try + { + DERValue val = DERReader.read(b); + if (!(val.getValue() instanceof BigInteger)) + return false; + crlNumber = (BigInteger) val.getValue(); + } + catch (IOException ioe) + { + return false; + } + if (maxCrlNumber.compareTo(crlNumber) < 0) + return false; + } + if (minCrlNumber != null) + { + if (crlNumber == null) { byte[] b = crl.getExtensionValue(CRL_NUMBER_ID); if (b == null) @@ -394,42 +413,9 @@ public class X509CRLSelector implements CRLSelector, Cloneable { return false; } - if (maxCrlNumber.compareTo(crlNumber) < 0) - return false; - } - catch (CertificateParsingException cpe) - { - return false; - } - } - if (minCrlNumber != null) - { - try - { - if (crlNumber == null) - { - byte[] b = crl.getExtensionValue(CRL_NUMBER_ID); - if (b == null) - return false; - try - { - DERValue val = DERReader.read(b); - if (!(val.getValue() instanceof BigInteger)) - return false; - crlNumber = (BigInteger) val.getValue(); - } - catch (IOException ioe) - { - return false; - } - } - if (minCrlNumber.compareTo(crlNumber) > 0) - return false; - } - catch (CertificateParsingException cpe) - { - return false; } + if (minCrlNumber.compareTo(crlNumber) > 0) + return false; } if (date != null) { -- 2.30.2