Skip to content
Snippets Groups Projects
Commit d90c2ce8 authored by Brian Major's avatar Brian Major
Browse files

s1890 - A user is consistent with another if they are equals

parent 4e2c695c
No related branches found
No related tags found
No related merge requests found
...@@ -68,8 +68,6 @@ ...@@ -68,8 +68,6 @@
*/ */
package ca.nrc.cadc.ac; package ca.nrc.cadc.ac;
import ca.nrc.cadc.auth.HttpPrincipal;
import java.security.Principal; import java.security.Principal;
import java.util.Comparator; import java.util.Comparator;
import java.util.Date; import java.util.Date;
...@@ -77,6 +75,8 @@ import java.util.HashSet; ...@@ -77,6 +75,8 @@ import java.util.HashSet;
import java.util.Set; import java.util.Set;
import java.util.TreeSet; import java.util.TreeSet;
import ca.nrc.cadc.auth.HttpPrincipal;
public class User public class User
{ {
private InternalID id; private InternalID id;
...@@ -155,23 +155,22 @@ public class User ...@@ -155,23 +155,22 @@ public class User
return false; return false;
} }
if (this.equals(other))
{
return true;
}
for (Principal identity: getIdentities()) for (Principal identity: getIdentities())
{ {
boolean found = false;
for (Principal op: other.getIdentities()) for (Principal op: other.getIdentities())
{ {
if (op.equals(identity)) if (op.equals(identity))
{ {
found = true; return true;
break;
} }
} }
if (!found)
{
return false;
} }
} return false;
return true;
} }
/* (non-Javadoc) /* (non-Javadoc)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment