return new Subject();
}
- Set<Principal> principals = new HashSet<Principal>();
+ Set<Principal> principals = new HashSet<Principal>(3);
principals.addAll(subject1.getPrincipals());
principals.addAll(subject2.getPrincipals());
- Set<Object> publicCredentials = new HashSet<Object>();
+ Set<Object> publicCredentials = new HashSet<Object>(3);
publicCredentials.addAll(subject1.getPublicCredentials());
publicCredentials.addAll(subject2.getPublicCredentials());
- Set<Object> privateCredentials = new HashSet<Object>();
+ Set<Object> privateCredentials = new HashSet<Object>(3);
privateCredentials.addAll(subject1.getPrivateCredentials());
privateCredentials.addAll(subject2.getPrivateCredentials());
package edu.internet2.middleware.shibboleth.idp.authn;
import java.io.Serializable;
-import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.joda.time.DateTime;
+import org.opensaml.xml.util.LazyList;
import edu.internet2.middleware.shibboleth.idp.session.AuthenticationMethodInformation;
private String sessionID;
/** List of request authentication methods. */
- private ArrayList<String> requestAuthenticationMethods;
+ private List<String> requestAuthenticationMethods;
/** Information about the authentication method. */
private AuthenticationMethodInformation authenticationMethodInformation;
/** Creates a new instance of LoginContext. */
public LoginContext() {
- requestAuthenticationMethods = new ArrayList<String>();
+ requestAuthenticationMethods = new LazyList<String>();
}
/**
public LoginContext(boolean force, boolean passive) {
forceAuth = force;
passiveAuth = passive;
- requestAuthenticationMethods = new ArrayList<String>();
+ requestAuthenticationMethods = new LazyList<String>();
}
/**
import java.io.Serializable;
import java.io.StringWriter;
-import java.util.ArrayList;
import java.util.List;
import org.opensaml.Configuration;
import org.opensaml.xml.io.MarshallingException;
import org.opensaml.xml.io.UnmarshallingException;
import org.opensaml.xml.util.DatatypeHelper;
+import org.opensaml.xml.util.LazyList;
import org.opensaml.xml.util.XMLHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
* @return requested authentication methods, or an empty list if no preference
*/
protected List<String> extractRequestedAuthenticationMethods(AuthnRequest request){
- ArrayList<String> requestedMethods = new ArrayList<String>();
+ LazyList<String> requestedMethods = new LazyList<String>();
RequestedAuthnContext authnContext = request.getRequestedAuthnContext();
if (authnContext == null) {
package edu.internet2.middleware.shibboleth.idp.authn.provider;
-import java.util.ArrayList;
import java.util.List;
+import org.opensaml.xml.util.LazyList;
+
import edu.internet2.middleware.shibboleth.idp.authn.LoginHandler;
/**
public abstract class AbstractLoginHandler implements LoginHandler {
/** Authentication methods this handler supports. */
- private ArrayList<String> supportedAuthenticationMethods;
+ private List<String> supportedAuthenticationMethods;
/** Length of time, in milliseconds, after which a user should be re-authenticated. */
private long authenticationDuration;
/** Constructor. */
protected AbstractLoginHandler(){
- supportedAuthenticationMethods = new ArrayList<String>();
+ supportedAuthenticationMethods = new LazyList<String>();
supportsForceAuthentication = false;
supportsPassive = false;
}