Skip to content
Snippets Groups Projects
Commit 8170966a authored by Alinga Yeung's avatar Alinga Yeung
Browse files

Story ac2. Changed NumericPrincipal to use an int instead of a long.

parent b2d2f0f7
No related branches found
No related tags found
No related merge requests found
......@@ -522,7 +522,7 @@ public class LdapUserDAO<T extends Principal> extends LdapDAO
searchResult.getAttributeValue(
userLdapAttrib.get(HttpPrincipal.class))));
Long numericID = searchResult.getAttributeValueAsLong(userLdapAttrib.get(NumericPrincipal.class));
Integer numericID = searchResult.getAttributeValueAsInteger(userLdapAttrib.get(NumericPrincipal.class));
logger.debug("Numeric id is: " + numericID);
if (numericID == null)
{
......@@ -586,7 +586,7 @@ public class LdapUserDAO<T extends Principal> extends LdapDAO
user.getIdentities().add(new HttpPrincipal(
searchResult.getAttributeValue(LDAP_UID)));
user.getIdentities().add(new NumericPrincipal(
searchResult.getAttributeValueAsLong(LDAP_NUMERICID)));
searchResult.getAttributeValueAsInteger(LDAP_NUMERICID)));
user.getIdentities().add(new X500Principal(
searchResult.getAttributeValue(LDAP_DISTINGUISHED_NAME)));
user.getIdentities().add(new DNPrincipal(
......
......@@ -261,7 +261,7 @@ public abstract class UserActionFactory
else if (idType.equalsIgnoreCase(IdentityType.CADC.getValue()))
{
return new User<NumericPrincipal>(new NumericPrincipal(
Long.parseLong(userName)));
Integer.parseInt(userName)));
}
else if (idType.equalsIgnoreCase(IdentityType.OPENID.getValue()))
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment