diff options
Diffstat (limited to 'java/security/Identity.java')
-rw-r--r-- | java/security/Identity.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/java/security/Identity.java b/java/security/Identity.java index d3f48e887..9086bb7ab 100644 --- a/java/security/Identity.java +++ b/java/security/Identity.java @@ -1,5 +1,5 @@ /* Identity.java --- Identity Class - Copyright (C) 1999, 2003, 2014, Free Software Foundation, Inc. + Copyright (C) 1999, 2003, 2014, 2015, Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,7 +49,7 @@ import java.util.Vector; * identity. The names cannot be changed and the identities can be scoped. Each * identity (name and public key) within a scope are unique to that scope.</p> * - * <p>Each identity has a set of ceritificates which all specify the same + * <p>Each identity has a set of certificates which all specify the same * public key, but not necessarily the same name.</p> * * <p>The <code>Identity</code> class can be subclassed to allow additional @@ -63,6 +63,7 @@ import java.util.Vector; * <code>java.security.cert</code> package, and * <code>java.security.Principal</code>. */ +@Deprecated public abstract class Identity implements Principal, Serializable { private static final long serialVersionUID = 3609922007826600659L; @@ -110,6 +111,7 @@ public abstract class Identity implements Principal, Serializable } /** @return the name of this identity. */ + @Override public final String getName() { return name; @@ -252,6 +254,7 @@ public abstract class Identity implements Principal, Serializable * @return <code>true</code> if they are equal, <code>false</code> * otherwise. */ + @Override public final boolean equals(Object identity) { if (identity instanceof Identity) @@ -290,6 +293,7 @@ public abstract class Identity implements Principal, Serializable * if a {@link SecurityManager} is installed which disallows this * operation. */ + @Override public String toString() { SecurityManager sm = System.getSecurityManager(); @@ -321,14 +325,12 @@ public abstract class Identity implements Principal, Serializable /* TODO: Insert proper detailed format here */ return (name + ":@" + scope + " Public Key: " + publicKey); } - else - { - /* TODO: Insert proper format here */ - return (name + ":@" + scope + " Public Key: " + publicKey); - } + /* TODO: Insert proper format here */ + return (name + ":@" + scope + " Public Key: " + publicKey); } /** @return a hashcode of this identity. */ + @Override public int hashCode() { int ret = name.hashCode(); |