diff options
Diffstat (limited to 'libjava/classpath/gnu/java/security/x509')
-rw-r--r-- | libjava/classpath/gnu/java/security/x509/ext/BasicConstraints.java | 2 | ||||
-rw-r--r-- | libjava/classpath/gnu/java/security/x509/ext/Extension.java | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/libjava/classpath/gnu/java/security/x509/ext/BasicConstraints.java b/libjava/classpath/gnu/java/security/x509/ext/BasicConstraints.java index 00f7a6ed220..d8f5c6158e3 100644 --- a/libjava/classpath/gnu/java/security/x509/ext/BasicConstraints.java +++ b/libjava/classpath/gnu/java/security/x509/ext/BasicConstraints.java @@ -112,7 +112,7 @@ public class BasicConstraints extends Extension.Value if (encoded == null) { List bc = new ArrayList (2); - bc.add (new DERValue (DER.BOOLEAN, new Boolean (ca))); + bc.add (new DERValue (DER.BOOLEAN, Boolean.valueOf (ca))); if (pathLenConstraint >= 0) bc.add (new DERValue (DER.INTEGER, BigInteger.valueOf ((long) pathLenConstraint))); diff --git a/libjava/classpath/gnu/java/security/x509/ext/Extension.java b/libjava/classpath/gnu/java/security/x509/ext/Extension.java index 5ca9ac3a91d..97097a2f380 100644 --- a/libjava/classpath/gnu/java/security/x509/ext/Extension.java +++ b/libjava/classpath/gnu/java/security/x509/ext/Extension.java @@ -232,7 +232,7 @@ public class Extension { List ext = new ArrayList (3); ext.add (new DERValue (DER.OBJECT_IDENTIFIER, oid)); - ext.add (new DERValue (DER.BOOLEAN, new Boolean (critical))); + ext.add (new DERValue (DER.BOOLEAN, Boolean.valueOf (critical))); ext.add (new DERValue (DER.OCTET_STRING, value.getEncoded())); return new DERValue (DER.CONSTRUCTED|DER.SEQUENCE, ext); } @@ -274,6 +274,14 @@ public class Extension return (byte[]) encoded; } + public int hashCode() + { + int result = 0; + for (int i = 0; i < encoded.length; ++i) + result = result * 31 + encoded[i]; + return result; + } + public boolean equals(Object o) { if (!(o instanceof Value)) |