diff options
| author | Casey Marshall <csm@gnu.org> | 2004-08-14 17:51:40 +0000 |
|---|---|---|
| committer | Casey Marshall <csm@gnu.org> | 2004-08-14 17:51:40 +0000 |
| commit | 5593f57038abf197fb29aecfe42f2cb4d7ea3cb2 (patch) | |
| tree | 0fbbad7f76f2382fb366565155c983ec4b73b021 /gnu/java/security/OID.java | |
| parent | 3169fca76e3d6bbf46f9b139d24bbc91684c8c62 (diff) | |
| download | classpath-5593f57038abf197fb29aecfe42f2cb4d7ea3cb2.tar.gz | |
2004-08-14 Casey Marshall <csm@gnu.org>
Author e-mail updated for all files.
* gnu/java/security/OID.java (equals): test if the aurgment is an
instance of OID.
(compareTo): use `equals'.
* gnu/java/security/der/BitString.java (equals): test if the
argument is an instance of BitString.
* gnu/java/security/der/DERReader.java: Removed NIO imports. Made
class final. Made fields private.
(<init>): new constructor.
(skip): new method.
(makeString): made static; don't use NIO.
(fromIso88591, fromUtf16Be, fromUtf8): new methods.
* gnu/java/security/der/DERWriter.java: fixed imports.
(writeString): don't use NIO.
(toIso88591, toUtf16Be, toUtf8): new methods.
* gnu/java/security/der/DERValue.java: formatting changes only.
* gnu/java/security/der/DER.java: likewise.
Diffstat (limited to 'gnu/java/security/OID.java')
| -rw-r--r-- | gnu/java/security/OID.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gnu/java/security/OID.java b/gnu/java/security/OID.java index c27ec9253..c17d94b26 100644 --- a/gnu/java/security/OID.java +++ b/gnu/java/security/OID.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -65,7 +65,7 @@ import gnu.java.security.der.DEREncodingException; * <p>OIDs may be relative, in which case the first two elements of the * OID are omitted. * - * @author Casey Marshall (rsdio@metastatic.org) + * @author Casey Marshall (csm@gnu.org) */ public class OID implements Cloneable, Comparable, java.io.Serializable { @@ -336,7 +336,7 @@ public class OID implements Cloneable, Comparable, java.io.Serializable /* Nice idea, but possibly too expensive for whatever benefit it * provides. - + public String getShortName() { return OIDTable.getShortName(this); @@ -391,8 +391,8 @@ public class OID implements Cloneable, Comparable, java.io.Serializable */ public boolean equals(Object o) { - if (this == o) - return true; + if (!(o instanceof OID)) + return false; return java.util.Arrays.equals(components, ((OID) o).components); } @@ -411,7 +411,7 @@ public class OID implements Cloneable, Comparable, java.io.Serializable */ public int compareTo(Object o) { - if (o == this) + if (equals(o)) return 0; int[] components2 = ((OID) o).components; int len = Math.min(components.length, components2.length); |
