Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Fix participant count problem in workspace user view
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eng committed May 3, 2012
1 parent 1b84f15 commit c0e9660
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
Expand Up @@ -150,8 +150,6 @@ public void addTranslator(SessionId sessionId, Person person, TransUnit selected

public int getTranslatorsSize()
{
Log.info("==========return getUserSize()" + userSessionMap.size() + "");

return userSessionMap.size();
}

Expand Down
Expand Up @@ -66,6 +66,7 @@ public GetTranslatorListResult execute(GetTranslatorList action, ExecutionContex
entry.getValue().setPerson(translator);
translators.put(entry.getKey(), entry.getValue());
}

return new GetTranslatorListResult(translators, ImmutableSet.copyOf(result.values()).size());
}

Expand Down
Expand Up @@ -40,4 +40,34 @@ public void setPerson(Person person)
{
this.person = person;
}

@Override
public int hashCode()
{
final int prime = 31;
int result = 1;
result = prime * result + ((person == null) ? 0 : person.hashCode());
return result;
}

@Override
public boolean equals(Object obj)
{
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
PersonSessionDetails other = (PersonSessionDetails) obj;
if (person == null)
{
if (other.person != null)
return false;
}
else if (!person.equals(other.person))
return false;
return true;
}

}

0 comments on commit c0e9660

Please sign in to comment.