diff options
Diffstat (limited to 'javax')
33 files changed, 237 insertions, 162 deletions
diff --git a/javax/naming/directory/BasicAttribute.java b/javax/naming/directory/BasicAttribute.java index 65b44169e..df18a1b6c 100644 --- a/javax/naming/directory/BasicAttribute.java +++ b/javax/naming/directory/BasicAttribute.java @@ -1,5 +1,5 @@ /* BasicAttribute.java -- - Copyright (C) 2000, 2001, 2004, 2006 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2004, 2006, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -94,6 +94,7 @@ public class BasicAttribute implements Attribute values.add (value); } + @Override public void add (int index, Object val) { if (! ordered && contains (val)) @@ -101,6 +102,7 @@ public class BasicAttribute implements Attribute values.add (index, val); } + @Override public boolean add (Object val) { if (! ordered && contains (val)) @@ -108,11 +110,13 @@ public class BasicAttribute implements Attribute return values.add (val); } + @Override public void clear () { values.clear (); } + @Override public Object clone () { BasicAttribute c = new BasicAttribute (); @@ -122,6 +126,7 @@ public class BasicAttribute implements Attribute return c; } + @Override public boolean contains (Object val) { for (int i = 0; i < values.size (); ++i) @@ -133,6 +138,7 @@ public class BasicAttribute implements Attribute return false; } + @Override public boolean equals (Object obj) { if (! (obj instanceof BasicAttribute)) @@ -167,7 +173,8 @@ public class BasicAttribute implements Attribute return true; } - + + @Override public Object get () throws NamingException { @@ -176,35 +183,41 @@ public class BasicAttribute implements Attribute return get (0); } + @Override public Object get (int index) throws NamingException { return values.get (index); } + @Override public NamingEnumeration<?> getAll () throws NamingException { return new BasicAttributeEnumeration (); } + @Override public DirContext getAttributeDefinition () throws OperationNotSupportedException, NamingException { throw new OperationNotSupportedException (); } + @Override public DirContext getAttributeSyntaxDefinition () throws OperationNotSupportedException, NamingException { throw new OperationNotSupportedException (); } + @Override public String getID () { return attrID; } + @Override public int hashCode () { int val = attrID.hashCode (); @@ -228,16 +241,19 @@ public class BasicAttribute implements Attribute return val; } + @Override public boolean isOrdered () { return ordered; } + @Override public Object remove (int index) { return values.remove (index); } + @Override public boolean remove (Object val) { for (int i = 0; i < values.size (); ++i) @@ -252,6 +268,7 @@ public class BasicAttribute implements Attribute return false; } + @Override public Object set (int index, Object val) { if (! ordered && contains (val)) @@ -259,11 +276,13 @@ public class BasicAttribute implements Attribute return values.set (index, val); } + @Override public int size () { return values.size (); } + @Override public String toString () { String r = attrID; @@ -321,7 +340,7 @@ public class BasicAttribute implements Attribute } // Used when enumerating this attribute. - private class BasicAttributeEnumeration implements NamingEnumeration + private class BasicAttributeEnumeration implements NamingEnumeration<Object> { int where = 0; @@ -329,25 +348,30 @@ public class BasicAttribute implements Attribute { } + @Override public void close () throws NamingException { } + @Override public boolean hasMore () throws NamingException { return hasMoreElements (); } + @Override public Object next () throws NamingException { return nextElement (); } + @Override public boolean hasMoreElements () { return where < values.size (); } + @Override public Object nextElement () throws NoSuchElementException { if (where == values.size ()) diff --git a/javax/security/auth/AuthPermission.java b/javax/security/auth/AuthPermission.java index 176ed9fb4..36ae8f9e9 100644 --- a/javax/security/auth/AuthPermission.java +++ b/javax/security/auth/AuthPermission.java @@ -1,5 +1,5 @@ /* AuthPermission.java -- permissions related to authentication. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -122,6 +122,8 @@ import java.security.BasicPermission; public final class AuthPermission extends BasicPermission { + private static final long serialVersionUID = 5806031445061587174L; + /** * Creates a new authentication permission for the given target name. * diff --git a/javax/security/auth/DestroyFailedException.java b/javax/security/auth/DestroyFailedException.java index 98de82bd4..16d1c7241 100644 --- a/javax/security/auth/DestroyFailedException.java +++ b/javax/security/auth/DestroyFailedException.java @@ -1,5 +1,5 @@ /* DestroyFailedException.java -- signals an object could not be destroyed. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -47,6 +47,8 @@ package javax.security.auth; public class DestroyFailedException extends Exception { + private static final long serialVersionUID = -7790152857282749162L; + /** * Creates a new DestroyFailedException with no detail message. */ diff --git a/javax/security/auth/PrivateCredentialPermission.java b/javax/security/auth/PrivateCredentialPermission.java index 1982eef3d..7c5f02090 100644 --- a/javax/security/auth/PrivateCredentialPermission.java +++ b/javax/security/auth/PrivateCredentialPermission.java @@ -1,5 +1,5 @@ /* PrivateCredentialPermission.java -- permissions governing private credentials. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -83,7 +83,7 @@ public final class PrivateCredentialPermission extends Permission * @serial The principals, a set of CredOwner objects (an undocumented * inner class of this class). */ - private final Set principals; + private final Set<CredOwner> principals; /** * @serial Who knows? @@ -109,7 +109,7 @@ public final class PrivateCredentialPermission extends Permission throw new IllegalArgumentException("actions must be \"read\""); } StringTokenizer st = new StringTokenizer (name, " \"'"); - principals = new HashSet(); + principals = new HashSet<CredOwner>(); if (st.countTokens() < 3 || (st.countTokens() & 1) == 0) { throw new IllegalArgumentException ("badly formed credential name"); @@ -142,19 +142,19 @@ public final class PrivateCredentialPermission extends Permission } final String[][] principals = getPrincipals(); - final String[][] that_principals = that.getPrincipals(); - if (that_principals == null) + final String[][] thatPrincipals = that.getPrincipals(); + if (thatPrincipals == null) { return false; } - if (that_principals.length != principals.length) + if (thatPrincipals.length != principals.length) { return false; } for (int i = 0; i < principals.length; i++) { - if (!principals[i][0].equals (that_principals[i][0]) || - !principals[i][1].equals (that_principals[i][1])) + if (!principals[i][0].equals (thatPrincipals[i][0]) || + !principals[i][1].equals (thatPrincipals[i][1])) { return false; } @@ -196,10 +196,10 @@ public final class PrivateCredentialPermission extends Permission public String[][] getPrincipals() { String[][] ret = new String[principals.size()][]; - Iterator it = principals.iterator(); + Iterator<CredOwner> it = principals.iterator(); for (int i = 0; i < principals.size() && it.hasNext(); i++) { - CredOwner co = (CredOwner) it.next(); + CredOwner co = it.next(); ret[i] = new String[] { co.getPrincipalClass(), co.getPrincipalName() }; } return ret; @@ -241,18 +241,18 @@ public final class PrivateCredentialPermission extends Permission return false; } String[][] principals = getPrincipals(); - String[][] that_principals = that.getPrincipals(); - if (that_principals == null) + String[][] thatPrincipals = that.getPrincipals(); + if (thatPrincipals == null) { return false; } for (int i = 0; i < principals.length; i++) { - for (int j = 0; j < that_principals.length; j++) + for (int j = 0; j < thatPrincipals.length; j++) { - if (principals[i][0].equals (that_principals[j][0]) && + if (principals[i][0].equals (thatPrincipals[j][0]) && (principals[i][1].equals ("*") || - principals[i][1].equals (that_principals[j][1]))) + principals[i][1].equals (thatPrincipals[j][1]))) { return true; } @@ -280,6 +280,8 @@ public final class PrivateCredentialPermission extends Permission private static class CredOwner implements Serializable { + private static final long serialVersionUID = -5607449830436408266L; + // Fields. // ----------------------------------------------------------------------- diff --git a/javax/security/auth/RefreshFailedException.java b/javax/security/auth/RefreshFailedException.java index 6b8f94dcd..8409dd16a 100644 --- a/javax/security/auth/RefreshFailedException.java +++ b/javax/security/auth/RefreshFailedException.java @@ -1,5 +1,5 @@ /* RefreshFailedException.java -- signals a failed refresh. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -44,6 +44,8 @@ package javax.security.auth; public class RefreshFailedException extends Exception { + private static final long serialVersionUID = 5058444488565265840L; + /** * Create a new RefreshFailedException with no detail message. */ diff --git a/javax/security/auth/Subject.java b/javax/security/auth/Subject.java index e9b0804a5..a5f7a37d0 100644 --- a/javax/security/auth/Subject.java +++ b/javax/security/auth/Subject.java @@ -1,5 +1,5 @@ /* Subject.java -- a single entity in the system. - Copyright (C) 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -70,24 +70,24 @@ public final class Subject implements Serializable * @serial The set of principals. The type of this field is SecureSet, a * private inner class. */ - private final Set principals; + private final Set<Principal> principals; /** * @serial The read-only flag. */ private boolean readOnly; - private final transient SecureSet pubCred; - private final transient SecureSet privCred; + private final transient SecureSet<Object> pubCred; + private final transient SecureSet<Object> privCred; // Constructors. // ------------------------------------------------------------------------- public Subject() { - principals = new SecureSet (this, SecureSet.PRINCIPALS); - pubCred = new SecureSet (this, SecureSet.PUBLIC_CREDENTIALS); - privCred = new SecureSet (this, SecureSet.PRIVATE_CREDENTIALS); + principals = new SecureSet<Principal> (this, SecureSet.PRINCIPALS); + pubCred = new SecureSet<Object> (this, SecureSet.PUBLIC_CREDENTIALS); + privCred = new SecureSet<Object> (this, SecureSet.PRIVATE_CREDENTIALS); readOnly = false; } @@ -99,9 +99,9 @@ public final class Subject implements Serializable { throw new NullPointerException(); } - this.principals = new SecureSet (this, SecureSet.PRINCIPALS, principals); - this.pubCred = new SecureSet (this, SecureSet.PUBLIC_CREDENTIALS, pubCred); - this.privCred = new SecureSet (this, SecureSet.PRIVATE_CREDENTIALS, privCred); + this.principals = new SecureSet<Principal> (this, SecureSet.PRINCIPALS, principals); + this.pubCred = new SecureSet<Object> (this, SecureSet.PUBLIC_CREDENTIALS, pubCred); + this.privCred = new SecureSet<Object> (this, SecureSet.PRIVATE_CREDENTIALS, privCred); this.readOnly = readOnly; } @@ -150,7 +150,7 @@ public final class Subject implements Serializable * @throws SecurityException If the caller is not allowed to run under a * different identity (<code>"doAs"</code> target of {@link AuthPermission}. */ - public static Object doAs (final Subject subject, final PrivilegedAction action) + public static <T> T doAs (final Subject subject, final PrivilegedAction<T> action) { final SecurityManager sm = System.getSecurityManager(); if (sm != null) @@ -176,8 +176,8 @@ public final class Subject implements Serializable * different identity (<code>"doAs"</code> target of {@link AuthPermission}. * @throws PrivilegedActionException If the action throws an exception. */ - public static Object doAs (final Subject subject, - final PrivilegedExceptionAction action) + public static <T> T doAs (final Subject subject, + final PrivilegedExceptionAction<T> action) throws PrivilegedActionException { final SecurityManager sm = System.getSecurityManager(); @@ -205,9 +205,9 @@ public final class Subject implements Serializable * different identity (<code>"doAsPrivileged"</code> target of {@link * AuthPermission}. */ - public static Object doAsPrivileged (final Subject subject, - final PrivilegedAction action, - final AccessControlContext acc) + public static <T> T doAsPrivileged (final Subject subject, + final PrivilegedAction<T> action, + final AccessControlContext acc) { final SecurityManager sm = System.getSecurityManager(); if (sm != null) @@ -234,9 +234,9 @@ public final class Subject implements Serializable * {@link AuthPermission}. * @throws PrivilegedActionException If the action throws an exception. */ - public static Object doAsPrivileged (final Subject subject, - final PrivilegedExceptionAction action, - AccessControlContext acc) + public static <T> T doAsPrivileged (final Subject subject, + final PrivilegedExceptionAction<T> action, + AccessControlContext acc) throws PrivilegedActionException { final SecurityManager sm = System.getSecurityManager(); @@ -253,7 +253,7 @@ public final class Subject implements Serializable // Instance methods. // ------------------------------------------------------------------------- - + @Override public boolean equals (Object o) { if (!(o instanceof Subject)) @@ -273,13 +273,13 @@ public final class Subject implements Serializable public <T extends Principal> Set<T> getPrincipals(Class<T> clazz) { - HashSet result = new HashSet (principals.size()); - for (Iterator it = principals.iterator(); it.hasNext(); ) + HashSet<T> result = new HashSet<T> (principals.size()); + for (Iterator<Principal> it = principals.iterator(); it.hasNext(); ) { - Object o = it.next(); + Principal o = it.next(); if (o != null && clazz.isAssignableFrom (o.getClass())) { - result.add(o); + result.add(clazz.cast(o)); } } return Collections.unmodifiableSet (result); @@ -292,13 +292,13 @@ public final class Subject implements Serializable public <T> Set<T> getPrivateCredentials (Class<T> clazz) { - HashSet result = new HashSet (privCred.size()); - for (Iterator it = privCred.iterator(); it.hasNext(); ) + HashSet<T> result = new HashSet<T> (privCred.size()); + for (Iterator<Object> it = privCred.iterator(); it.hasNext(); ) { Object o = it.next(); if (o != null && clazz.isAssignableFrom (o.getClass())) { - result.add(o); + result.add(clazz.cast(o)); } } return Collections.unmodifiableSet (result); @@ -311,18 +311,19 @@ public final class Subject implements Serializable public <T> Set<T> getPublicCredentials (Class<T> clazz) { - HashSet result = new HashSet (pubCred.size()); - for (Iterator it = pubCred.iterator(); it.hasNext(); ) + HashSet<T> result = new HashSet<T> (pubCred.size()); + for (Iterator<Object> it = pubCred.iterator(); it.hasNext(); ) { Object o = it.next(); if (o != null && clazz.isAssignableFrom (o.getClass())) { - result.add(o); + result.add(clazz.cast(o)); } } return Collections.unmodifiableSet (result); } + @Override public int hashCode() { return principals.hashCode() + privCred.hashCode() + pubCred.hashCode(); @@ -355,6 +356,7 @@ public final class Subject implements Serializable readOnly = true; } + @Override public String toString() { return Subject.class.getName() + " [ principals=" + principals + @@ -368,7 +370,7 @@ public final class Subject implements Serializable /** * An undocumented inner class that is used for sets in the parent class. */ - private static class SecureSet extends AbstractSet implements Serializable + private static class SecureSet<E> extends AbstractSet<E> implements Serializable { // Fields. // ----------------------------------------------------------------------- @@ -380,25 +382,24 @@ public final class Subject implements Serializable static final int PRIVATE_CREDENTIALS = 2; private final Subject subject; - private final LinkedList elements; + private final LinkedList<E> elements; private final transient int type; // Constructors. // ----------------------------------------------------------------------- - SecureSet (final Subject subject, final int type, final Collection inElements) + SecureSet (final Subject subject, final int type, final Collection<? extends E> inElements) { this (subject, type); - for (Iterator it = inElements.iterator(); it.hasNext(); ) + for (E e : inElements) { - Object o = it.next(); - if (type == PRINCIPALS && !(o instanceof Principal)) + if (type == PRINCIPALS && !(e instanceof Principal)) { - throw new IllegalArgumentException(o+" is not a Principal"); + throw new IllegalArgumentException(e+" is not a Principal"); } - if (!this.elements.contains (o)) + if (!this.elements.contains (e)) { - this.elements.add (o); + this.elements.add (e); } } } @@ -407,23 +408,26 @@ public final class Subject implements Serializable { this.subject = subject; this.type = type; - this.elements = new LinkedList(); + this.elements = new LinkedList<E>(); } // Instance methods. // ----------------------------------------------------------------------- + @Override public synchronized int size() { return elements.size(); } - public Iterator iterator() + @Override + public Iterator<E> iterator() { return elements.iterator(); } - public synchronized boolean add(Object element) + @Override + public synchronized boolean add(E element) { if (subject.isReadOnly()) { @@ -468,7 +472,8 @@ public final class Subject implements Serializable return elements.add (element); } - + + @Override public synchronized boolean remove (final Object element) { if (subject.isReadOnly()) @@ -510,12 +515,14 @@ public final class Subject implements Serializable return elements.remove(element); } + @Override public synchronized boolean contains (final Object element) { return elements.contains (element); } - public boolean removeAll (final Collection c) + @Override + public boolean removeAll (final Collection<?> c) { if (subject.isReadOnly()) { @@ -524,7 +531,8 @@ public final class Subject implements Serializable return super.removeAll (c); } - public boolean retainAll (final Collection c) + @Override + public boolean retainAll (final Collection<?> c) { if (subject.isReadOnly()) { @@ -533,6 +541,7 @@ public final class Subject implements Serializable return super.retainAll (c); } + @Override public void clear() { if (subject.isReadOnly()) diff --git a/javax/security/auth/SubjectDomainCombiner.java b/javax/security/auth/SubjectDomainCombiner.java index 927e7479d..a50e54b12 100644 --- a/javax/security/auth/SubjectDomainCombiner.java +++ b/javax/security/auth/SubjectDomainCombiner.java @@ -1,5 +1,5 @@ /* SubjectDomainCombiner.java -- domain combiner for Subjects. - Copyright (C) 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -66,10 +66,10 @@ public class SubjectDomainCombiner implements DomainCombiner public ProtectionDomain[] combine (final ProtectionDomain[] current, final ProtectionDomain[] assigned) { - LinkedList domains = new LinkedList(); + LinkedList<ProtectionDomain> domains = new LinkedList<ProtectionDomain>(); Principal[] principals = null; if (subject != null) - principals = (Principal[]) subject.getPrincipals().toArray (new Principal[0]); + principals = subject.getPrincipals().toArray (new Principal[0]); if (current != null) { for (int i = 0; i < current.length; i++) @@ -87,7 +87,7 @@ public class SubjectDomainCombiner implements DomainCombiner domains.add (assigned[i]); } } - return (ProtectionDomain[]) domains.toArray (new ProtectionDomain[domains.size()]); + return domains.toArray (new ProtectionDomain[domains.size()]); } public Subject getSubject() diff --git a/javax/security/auth/callback/ChoiceCallback.java b/javax/security/auth/callback/ChoiceCallback.java index 30bddd559..0ea2b526b 100644 --- a/javax/security/auth/callback/ChoiceCallback.java +++ b/javax/security/auth/callback/ChoiceCallback.java @@ -1,5 +1,5 @@ /* ChoiceCallback.java -- callback for a choice of values. - Copyright (C) 2003, Free Software Foundation, Inc. + Copyright (C) 2003, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -54,6 +54,8 @@ public class ChoiceCallback implements Callback, Serializable // Constants and variables // ------------------------------------------------------------------------- + private static final long serialVersionUID = -3975664071579892167L; + /** * @serial * @since 1.4 diff --git a/javax/security/auth/callback/ConfirmationCallback.java b/javax/security/auth/callback/ConfirmationCallback.java index 8f89bf5fa..fccc87236 100644 --- a/javax/security/auth/callback/ConfirmationCallback.java +++ b/javax/security/auth/callback/ConfirmationCallback.java @@ -1,5 +1,5 @@ /* ConfirmationCallback.java -- callback for confirmations. - Copyright (C) 2003, Free Software Foundation, Inc. + Copyright (C) 2003, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -54,6 +54,8 @@ public class ConfirmationCallback implements Callback, Serializable // Constants and variables // ------------------------------------------------------------------------- + private static final long serialVersionUID = -9095656433782481624L; + /** * <p>Unspecified option type.</p> * diff --git a/javax/security/auth/callback/LanguageCallback.java b/javax/security/auth/callback/LanguageCallback.java index e0190e6cc..d76b592c2 100644 --- a/javax/security/auth/callback/LanguageCallback.java +++ b/javax/security/auth/callback/LanguageCallback.java @@ -1,5 +1,5 @@ /* LanguageCallback.java -- callback for language choices. - Copyright (C) 2003, Free Software Foundation, Inc. + Copyright (C) 2003, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -54,6 +54,8 @@ public class LanguageCallback implements Callback, Serializable // Constants and variables // ------------------------------------------------------------------------- + private static final long serialVersionUID = 2019050433478903213L; + /** * @serial * @since 1.4 diff --git a/javax/security/auth/callback/NameCallback.java b/javax/security/auth/callback/NameCallback.java index 4b8bf1c69..6909e7310 100644 --- a/javax/security/auth/callback/NameCallback.java +++ b/javax/security/auth/callback/NameCallback.java @@ -1,5 +1,5 @@ /* NameCallback.java -- callback for user names. - Copyright (C) 2003, Free Software Foundation, Inc. + Copyright (C) 2003, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -53,6 +53,8 @@ public class NameCallback implements Callback, Serializable // Constants and variables // ------------------------------------------------------------------------- + private static final long serialVersionUID = 3770938795909392253L; + /** * @serial * @since 1.4 diff --git a/javax/security/auth/callback/PasswordCallback.java b/javax/security/auth/callback/PasswordCallback.java index 6309aacba..025cd6f03 100644 --- a/javax/security/auth/callback/PasswordCallback.java +++ b/javax/security/auth/callback/PasswordCallback.java @@ -1,5 +1,5 @@ /* PasswordCallback.java -- callback for passwords. - Copyright (C) 2003, Free Software Foundation, Inc. + Copyright (C) 2003, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -53,6 +53,8 @@ public class PasswordCallback implements Callback, Serializable // Constants and variables // ------------------------------------------------------------------------- + private static final long serialVersionUID = 2267422647454909926L; + /** * @serial * @since 1.4 diff --git a/javax/security/auth/callback/TextInputCallback.java b/javax/security/auth/callback/TextInputCallback.java index 1fe071327..b05b1d08c 100644 --- a/javax/security/auth/callback/TextInputCallback.java +++ b/javax/security/auth/callback/TextInputCallback.java @@ -1,5 +1,5 @@ /* TextInputCallback.java -- callbacks for user input. - Copyright (C) 2003, Free Software Foundation, Inc. + Copyright (C) 2003, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -53,6 +53,8 @@ public class TextInputCallback implements Callback, Serializable // Constants and variables // ------------------------------------------------------------------------- + private static final long serialVersionUID = -8064222478852811804L; + /** * @serial * @since 1.4 diff --git a/javax/security/auth/callback/TextOutputCallback.java b/javax/security/auth/callback/TextOutputCallback.java index 0ab3a040f..26223668c 100644 --- a/javax/security/auth/callback/TextOutputCallback.java +++ b/javax/security/auth/callback/TextOutputCallback.java @@ -1,5 +1,5 @@ /* TextOutputCallback.java -- callback for text output. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -54,6 +54,8 @@ public class TextOutputCallback implements Callback, Serializable // Constants and variables // ------------------------------------------------------------------------- + private static final long serialVersionUID = 1689502495511663102L; + /** Information message */ public static final int INFORMATION = 0; diff --git a/javax/security/auth/callback/UnsupportedCallbackException.java b/javax/security/auth/callback/UnsupportedCallbackException.java index f5308b9ea..9b698d270 100644 --- a/javax/security/auth/callback/UnsupportedCallbackException.java +++ b/javax/security/auth/callback/UnsupportedCallbackException.java @@ -1,5 +1,5 @@ /* UnsupportedCallbackException.java -- signals an unsupported callback type. - Copyright (C) 2003, Free Software Foundation, Inc. + Copyright (C) 2003, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,6 +49,8 @@ public class UnsupportedCallbackException extends Exception // Constants and variables // ------------------------------------------------------------------------- + private static final long serialVersionUID = -6873556327655666839L; + /** @serial */ private Callback callback; diff --git a/javax/security/auth/kerberos/DelegationPermission.java b/javax/security/auth/kerberos/DelegationPermission.java index 42bb9c73c..c2aa969fc 100644 --- a/javax/security/auth/kerberos/DelegationPermission.java +++ b/javax/security/auth/kerberos/DelegationPermission.java @@ -1,5 +1,5 @@ /* DelegationPermission.java -- kerberos delegation permission - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -50,8 +50,7 @@ import java.util.Vector; public final class DelegationPermission extends BasicPermission { - // FIXME: Enable this when serialization works. - // private static final long serialVersionUID = 883133252142523922L; + private static final long serialVersionUID = 883133252142523922L; /** * Create a new instance with the given name. @@ -91,19 +90,22 @@ public final class DelegationPermission throw new IllegalArgumentException("invalid syntax for principals"); } + @Override public boolean implies(Permission perm) { return equals(perm); } + @Override public PermissionCollection newPermissionCollection() { // FIXME: don't know how to serialize here. I suspect this // class has to have a particular name, etc ... return new PermissionCollection() { - private Vector permissions = new Vector(); + private Vector<Permission> permissions = new Vector<Permission>(); + @Override public void add(Permission perm) { if (isReadOnly()) @@ -113,21 +115,23 @@ public final class DelegationPermission permissions.add(perm); } + @Override public boolean implies(Permission perm) { if (! (perm instanceof DelegationPermission)) return false; - Enumeration e = elements(); + Enumeration<Permission> e = elements(); while (e.hasMoreElements()) { - DelegationPermission dp = (DelegationPermission) e.nextElement(); + Permission dp = e.nextElement(); if (dp.implies(perm)) return true; } return false; } - public Enumeration elements() + @Override + public Enumeration<Permission> elements() { return permissions.elements(); } diff --git a/javax/security/auth/kerberos/KerberosPrincipal.java b/javax/security/auth/kerberos/KerberosPrincipal.java index 4ba767226..46da0fa1c 100644 --- a/javax/security/auth/kerberos/KerberosPrincipal.java +++ b/javax/security/auth/kerberos/KerberosPrincipal.java @@ -1,5 +1,5 @@ /* KerberosPrincipal.java -- a kerberos principal - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -55,7 +55,7 @@ public final class KerberosPrincipal implements Serializable, Principal { // Uncomment when serialization is correct. - // private static final long serialVersionUID = -7374788026156829911L; + private static final long serialVersionUID = -7374788026156829911L; /** * Constant from the RFC: "Just the name of the principal as in DCE, or diff --git a/javax/security/auth/kerberos/KerberosTicket.java b/javax/security/auth/kerberos/KerberosTicket.java index ff70b9f4e..66227fd20 100644 --- a/javax/security/auth/kerberos/KerberosTicket.java +++ b/javax/security/auth/kerberos/KerberosTicket.java @@ -1,5 +1,5 @@ /* KerberosTicket.java -- a kerberos ticket - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -73,7 +73,7 @@ public class KerberosTicket private static final int INITIAL = 9; private static final int NUM_FLAGS = 12; - private byte[] asn1Encoding; + @SuppressWarnings("unusedPrivate") private byte[] asn1Encoding; private KeyImpl sessionKey; private boolean[] flags; private Date authTime; diff --git a/javax/security/auth/kerberos/KeyImpl.java b/javax/security/auth/kerberos/KeyImpl.java index a7cf3d212..d8027c07e 100644 --- a/javax/security/auth/kerberos/KeyImpl.java +++ b/javax/security/auth/kerberos/KeyImpl.java @@ -49,7 +49,7 @@ import javax.crypto.SecretKey; final class KeyImpl implements Serializable, SecretKey { // Enable this when serialization works. - // private static final long serialVersionUID = -7889313790214321193L; + private static final long serialVersionUID = -7889313790214321193L; public String algorithm; public int type; diff --git a/javax/security/auth/kerberos/ServicePermission.java b/javax/security/auth/kerberos/ServicePermission.java index 4412ea459..ba015246e 100644 --- a/javax/security/auth/kerberos/ServicePermission.java +++ b/javax/security/auth/kerberos/ServicePermission.java @@ -1,5 +1,5 @@ /* ServicePermission.java -- kerberos service permission - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -54,8 +54,7 @@ import java.util.Vector; public final class ServicePermission extends Permission { - // FIXME: Enable this when serialization works. - // private static final long serialVersionUID = -1227585031618624935L; + private static final long serialVersionUID = -1227585031618624935L; private static final int INITIATE = 1; private static final int ACCEPT = 2; @@ -82,6 +81,7 @@ public final class ServicePermission parseActions(action); } + @Override public boolean implies(Permission perm) { if (! (perm instanceof ServicePermission)) @@ -92,6 +92,7 @@ public final class ServicePermission return getName().equals(sp.getName()); } + @Override public boolean equals(Object obj) { if (! (obj instanceof ServicePermission)) @@ -100,6 +101,7 @@ public final class ServicePermission return flags == sp.flags && getName().equals(sp.getName()); } + @Override public int hashCode() { return getName().hashCode() + flags; @@ -108,6 +110,7 @@ public final class ServicePermission /** * Return a string representing the actions. */ + @Override public String getActions() { if (flags == (INITIATE | ACCEPT)) @@ -119,12 +122,14 @@ public final class ServicePermission return ""; } + @Override public PermissionCollection newPermissionCollection() { return new PermissionCollection() { - private Vector permissions = new Vector(); + private Vector<Permission> permissions = new Vector<Permission>(); + @Override public void add(Permission perm) { if (isReadOnly()) @@ -134,21 +139,23 @@ public final class ServicePermission permissions.add(perm); } + @Override public boolean implies(Permission perm) { if (! (perm instanceof ServicePermission)) return false; - Enumeration e = elements(); + Enumeration<Permission> e = elements(); while (e.hasMoreElements()) { - ServicePermission sp = (ServicePermission) e.nextElement(); + Permission sp = e.nextElement(); if (sp.implies(perm)) return true; } return false; } - public Enumeration elements() + @Override + public Enumeration<Permission> elements() { return permissions.elements(); } diff --git a/javax/security/auth/login/AppConfigurationEntry.java b/javax/security/auth/login/AppConfigurationEntry.java index 044c9105b..fd4d09210 100644 --- a/javax/security/auth/login/AppConfigurationEntry.java +++ b/javax/security/auth/login/AppConfigurationEntry.java @@ -1,5 +1,5 @@ /* AppConfigurationEntry.java - Copyright (C) 2004, 2006 Free Software Foundation, Inc. + Copyright (C) 2004, 2006, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,7 +49,7 @@ public class AppConfigurationEntry private final String loginModuleName; private final LoginModuleControlFlag controlFlag; - private final Map options; + private final Map<String,?> options; // Constructor. // ------------------------------------------------------------------------- @@ -72,7 +72,7 @@ public class AppConfigurationEntry this.loginModuleName = loginModuleName; this.controlFlag = controlFlag; - this.options = Collections.unmodifiableMap (new HashMap (options)); + this.options = Collections.unmodifiableMap (new HashMap<String,Object>(options)); } // Instance methods. diff --git a/javax/security/auth/login/Configuration.java b/javax/security/auth/login/Configuration.java index fe56f8a59..bbaef065d 100644 --- a/javax/security/auth/login/Configuration.java +++ b/javax/security/auth/login/Configuration.java @@ -1,5 +1,5 @@ /* Configuration.java - Copyright (C) 2004, 2006 Free Software Foundation, Inc. + Copyright (C) 2004, 2006, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -96,10 +96,10 @@ public abstract class Configuration { if (config == null) { - String conf = (String) AccessController.doPrivileged - (new PrivilegedAction() + String conf = AccessController.doPrivileged + (new PrivilegedAction<String>() { - public Object run() + public String run() { return Security.getProperty ("login.configuration.provider"); } diff --git a/javax/security/auth/login/LoginContext.java b/javax/security/auth/login/LoginContext.java index b2e4b97b6..39d8702c9 100644 --- a/javax/security/auth/login/LoginContext.java +++ b/javax/security/auth/login/LoginContext.java @@ -1,5 +1,5 @@ /* LoginContext.java - Copyright (C) 2004, 2006 Free Software Foundation, Inc. + Copyright (C) 2004, 2006, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -59,7 +59,7 @@ public class LoginContext private final Subject subject; private final AppConfigurationEntry[] entries; private final LoginModule[] modules; - private final Map sharedState; + private final Map<String,?> sharedState; public LoginContext (final String name) throws LoginException { @@ -104,7 +104,7 @@ public class LoginContext + name); this.entries = entries; modules = new LoginModule[entries.length]; - sharedState = new HashMap(); + sharedState = new HashMap<String,Object>(); for (int i = 0; i < entries.length; i++) modules[i] = lookupModule (entries[i], subject, sharedState); } @@ -195,7 +195,7 @@ public class LoginContext { GetSecurityPropertyAction act = new GetSecurityPropertyAction ("auth.login.defaultCallbackHandler"); - String classname = (String) AccessController.doPrivileged (act); + String classname = AccessController.doPrivileged (act); if (classname != null) { try @@ -223,7 +223,7 @@ public class LoginContext } private LoginModule lookupModule (AppConfigurationEntry entry, - Subject subject, Map sharedState) + Subject subject, Map<String,?> sharedState) throws LoginException { LoginModule module = null; @@ -231,7 +231,7 @@ public class LoginContext try { ClassLoader cl = Thread.currentThread().getContextClassLoader(); - Class c = Class.forName(entry.getLoginModuleName(), true, cl); + Class<?> c = Class.forName(entry.getLoginModuleName(), true, cl); module = (LoginModule) c.newInstance(); } catch (ClassNotFoundException cnfe) diff --git a/javax/security/auth/x500/X500Principal.java b/javax/security/auth/x500/X500Principal.java index 0a1e8c665..79c3336e1 100644 --- a/javax/security/auth/x500/X500Principal.java +++ b/javax/security/auth/x500/X500Principal.java @@ -1,5 +1,5 @@ /* X500Principal.java -- X.500 principal. - Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -89,9 +89,8 @@ public final class X500Principal implements Principal, Serializable private static final OID DC = new OID("0.9.2342.19200300.100.1.25"); private static final OID UID = new OID("0.9.2342.19200300.100.1.1"); - private transient List components; - private transient Map currentRdn; - private transient boolean fixed; + private transient List<Map<OID,String>> components; + private transient Map<OID,String> currentRdn; private transient byte[] encoded; // Constructors. @@ -99,8 +98,8 @@ public final class X500Principal implements Principal, Serializable private X500Principal() { - components = new LinkedList(); - currentRdn = new LinkedHashMap(); + components = new LinkedList<Map<OID,String>>(); + currentRdn = new LinkedHashMap<OID,String>(); components.add (currentRdn); } @@ -147,12 +146,11 @@ public final class X500Principal implements Principal, Serializable int result = size(); for (int i = 0; i < size(); ++i) { - Map m = (Map) components.get(i); - for (Iterator it2 = m.entrySet().iterator(); it2.hasNext(); ) + Map<OID,String> m = components.get(i); + for (Map.Entry<OID,String> e : m.entrySet()) { - Map.Entry e = (Map.Entry) it2.next(); // We don't bother looking at the value of the entry. - result = result * 31 + ((OID) e.getKey()).hashCode(); + result = result * 31 + e.getKey().hashCode(); } } return result; @@ -166,12 +164,11 @@ public final class X500Principal implements Principal, Serializable return false; for (int i = 0; i < size(); i++) { - Map m = (Map) components.get (i); - for (Iterator it2 = m.entrySet().iterator(); it2.hasNext(); ) + Map<OID,String> m = components.get (i); + for (Map.Entry<OID,String> e : m.entrySet()) { - Map.Entry e = (Map.Entry) it2.next(); - OID oid = (OID) e.getKey(); - String v1 = (String) e.getValue(); + OID oid = e.getKey(); + String v1 = e.getValue(); String v2 = ((X500Principal) o).getComponent (oid, i); if (v2 == null) return false; @@ -203,14 +200,14 @@ public final class X500Principal implements Principal, Serializable if (! (rfc2253 || rfc1779 || canon)) throw new IllegalArgumentException ("unsupported format " + format); CPStringBuilder str = new CPStringBuilder(); - for (Iterator it = components.iterator(); it.hasNext(); ) + for (Iterator<Map<OID,String>> it = components.iterator(); it.hasNext(); ) { - Map m = (Map) it.next(); - for (Iterator it2 = m.entrySet().iterator(); it2.hasNext(); ) + Map<OID,String> m = it.next(); + for (Iterator<Map.Entry<OID,String>> it2 = m.entrySet().iterator(); it2.hasNext(); ) { - Map.Entry entry = (Map.Entry) it2.next(); - OID oid = (OID) entry.getKey(); - String value = (String) entry.getValue(); + Map.Entry<OID,String> entry = it2.next(); + OID oid = entry.getKey(); + String value = entry.getValue(); if (oid.equals (CN)) str.append ("CN"); else if (oid.equals (C)) @@ -278,22 +275,20 @@ public final class X500Principal implements Principal, Serializable { if (rdn >= size()) return null; - return (String) ((Map) components.get (rdn)).get (oid); + return components.get(rdn).get(oid); } private void encodeDer() { - ArrayList name = new ArrayList(components.size()); - for (Iterator it = components.iterator(); it.hasNext(); ) + ArrayList<DERValue> name = new ArrayList<DERValue>(components.size()); + for (Map<OID,String> m : components) { - Map m = (Map) it.next(); if (m.isEmpty()) continue; - Set rdn = new HashSet(); - for (Iterator it2 = m.entrySet().iterator(); it2.hasNext(); ) + Set<DERValue> rdn = new HashSet<DERValue>(); + for (Map.Entry<OID,String> e : m.entrySet()) { - Map.Entry e = (Map.Entry) it2.next(); - ArrayList atav = new ArrayList(2); + ArrayList<DERValue> atav = new ArrayList<DERValue>(2); atav.add(new DERValue(DER.OBJECT_IDENTIFIER, e.getKey())); atav.add(new DERValue(DER.UTF8_STRING, e.getValue())); rdn.add(new DERValue(DER.SEQUENCE|DER.CONSTRUCTED, atav)); @@ -484,7 +479,7 @@ public final class X500Principal implements Principal, Serializable private void newRelativeDistinguishedName() { - currentRdn = new LinkedHashMap(); + currentRdn = new LinkedHashMap<OID,String>(); components.add(currentRdn); } diff --git a/javax/security/cert/CertificateEncodingException.java b/javax/security/cert/CertificateEncodingException.java index 47aedcf05..fa1440707 100644 --- a/javax/security/cert/CertificateEncodingException.java +++ b/javax/security/cert/CertificateEncodingException.java @@ -1,5 +1,5 @@ /* CertificateEncodingException.java -- certificate encoding exception. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -48,6 +48,8 @@ package javax.security.cert; public class CertificateEncodingException extends CertificateException { + private static final long serialVersionUID = 6219492851589449162L; + public CertificateEncodingException() { super(); diff --git a/javax/security/cert/CertificateException.java b/javax/security/cert/CertificateException.java index 270cc926f..d00ab80d7 100644 --- a/javax/security/cert/CertificateException.java +++ b/javax/security/cert/CertificateException.java @@ -1,5 +1,5 @@ /* CertificateException.java -- certificate exception. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -48,6 +48,8 @@ package javax.security.cert; public class CertificateException extends Exception { + private static final long serialVersionUID = 3192535253797119798L; + public CertificateException() { super(); diff --git a/javax/security/cert/CertificateExpiredException.java b/javax/security/cert/CertificateExpiredException.java index 3a8c0515e..1c4e68b96 100644 --- a/javax/security/cert/CertificateExpiredException.java +++ b/javax/security/cert/CertificateExpiredException.java @@ -1,5 +1,5 @@ /* CertificateExpiredException.java -- certificate expired exception. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -48,6 +48,8 @@ package javax.security.cert; public class CertificateExpiredException extends CertificateException { + private static final long serialVersionUID = 9071001339691533771L; + public CertificateExpiredException() { super(); diff --git a/javax/security/cert/CertificateNotYetValidException.java b/javax/security/cert/CertificateNotYetValidException.java index 22a7c4a22..4142bb0e2 100644 --- a/javax/security/cert/CertificateNotYetValidException.java +++ b/javax/security/cert/CertificateNotYetValidException.java @@ -1,5 +1,5 @@ /* CertificateNotYetValidException.java -- certificate not yet valid exception. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -48,6 +48,8 @@ package javax.security.cert; public class CertificateNotYetValidException extends CertificateException { + private static final long serialVersionUID = 4355919900041064702L; + public CertificateNotYetValidException() { super(); diff --git a/javax/security/cert/CertificateParsingException.java b/javax/security/cert/CertificateParsingException.java index f359f8d7a..dccf44329 100644 --- a/javax/security/cert/CertificateParsingException.java +++ b/javax/security/cert/CertificateParsingException.java @@ -1,5 +1,5 @@ /* CertificateParsingException.java -- certificate parsing exception. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -47,6 +47,8 @@ package javax.security.cert; public class CertificateParsingException extends CertificateException { + private static final long serialVersionUID = -7989222416793322029L; + public CertificateParsingException() { super(); diff --git a/javax/security/sasl/AuthenticationException.java b/javax/security/sasl/AuthenticationException.java index 0f674645d..6e00a722c 100644 --- a/javax/security/sasl/AuthenticationException.java +++ b/javax/security/sasl/AuthenticationException.java @@ -1,5 +1,5 @@ /* AuthenticationException.java -- - Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -55,6 +55,8 @@ package javax.security.sasl; public class AuthenticationException extends SaslException { + private static final long serialVersionUID = -3579708765071815007L; + // Constants and variables // ------------------------------------------------------------------------- diff --git a/javax/security/sasl/RealmCallback.java b/javax/security/sasl/RealmCallback.java index 7cb36433f..7112d7c40 100644 --- a/javax/security/sasl/RealmCallback.java +++ b/javax/security/sasl/RealmCallback.java @@ -1,5 +1,5 @@ /* RealmCallback.java -- - Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,6 +49,8 @@ import javax.security.auth.callback.TextInputCallback; public class RealmCallback extends TextInputCallback { + private static final long serialVersionUID = -4342673378785456908L; + /** * Constructs a <code>RealmCallback</code> with a prompt. * diff --git a/javax/security/sasl/RealmChoiceCallback.java b/javax/security/sasl/RealmChoiceCallback.java index 7068a504b..896be4722 100644 --- a/javax/security/sasl/RealmChoiceCallback.java +++ b/javax/security/sasl/RealmChoiceCallback.java @@ -1,5 +1,5 @@ /* RealmChoiceCallback.java -- - Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,6 +49,8 @@ import javax.security.auth.callback.ChoiceCallback; public class RealmChoiceCallback extends ChoiceCallback { + private static final long serialVersionUID = -8588141348846281332L; + /** * Constructs a <code>RealmChoiceCallback</code> with a prompt, a list of * choices and a default choice. diff --git a/javax/security/sasl/Sasl.java b/javax/security/sasl/Sasl.java index 475be09e0..e77bdb86b 100644 --- a/javax/security/sasl/Sasl.java +++ b/javax/security/sasl/Sasl.java @@ -1,5 +1,5 @@ /* Sasl.java -- - Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2014 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -457,10 +457,9 @@ public class Sasl */ public static Enumeration<SaslClientFactory> getSaslClientFactories() { - Vector result = new Vector(); - HashSet names = new HashSet(); + Vector<SaslClientFactory> result = new Vector<SaslClientFactory>(); + HashSet<String> names = new HashSet<String>(); Provider[] providers = Security.getProviders(); - Iterator it; if (providers != null) { Provider p; @@ -468,7 +467,7 @@ public class Sasl for (int i = 0; i < providers.length; i++) { p = providers[i]; - for (it = p.keySet().iterator(); it.hasNext(); ) + for (Iterator<Object> it = p.keySet().iterator(); it.hasNext(); ) { key = (String) it.next(); // add key's binding (a) it is a class of a client factory, @@ -483,9 +482,9 @@ public class Sasl } // we have the factory class names in names; instantiate and enumerate String c; - for (it = names.iterator(); it.hasNext(); ) + for (Iterator<String> it = names.iterator(); it.hasNext(); ) { - c = (String) it.next(); + c = it.next(); try { SaslClientFactory f = (SaslClientFactory) Class.forName(c).newInstance(); @@ -650,10 +649,9 @@ public class Sasl */ public static Enumeration<SaslServerFactory> getSaslServerFactories() { - Vector result = new Vector(); - HashSet names = new HashSet(); + Vector<SaslServerFactory> result = new Vector<SaslServerFactory>(); + HashSet<String> names = new HashSet<String>(); Provider[] providers = Security.getProviders(); - Iterator it; if (providers != null) { Provider p; @@ -661,7 +659,7 @@ public class Sasl for (int i = 0; i < providers.length; i++) { p = providers[i]; - for (it = p.keySet().iterator(); it.hasNext(); ) + for (Iterator<Object> it = p.keySet().iterator(); it.hasNext(); ) { key = (String) it.next(); // add key's binding (a) it is a class of a server factory, @@ -675,10 +673,8 @@ public class Sasl } } // we have the factory class names in names; instantiate and enumerate - String c; - for (it = names.iterator(); it.hasNext(); ) + for (String c : names) { - c = (String) it.next(); try { SaslServerFactory f = (SaslServerFactory) Class.forName(c).newInstance(); |