Commit f0daf674 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Minor stuff.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@8538 b35dd754-fafc-0310-a699-88a17e54d16e
parent 4861cc8f
......@@ -37,7 +37,7 @@ import java.util.Map;
*
* @author Matt Tucker
*/
public class JID implements Comparable, Serializable, Externalizable {
public class JID implements Comparable<JID>, Serializable, Externalizable {
// Stringprep operations are very expensive. Therefore, we cache node, domain and
// resource values that have already had stringprep applied so that we can check
......@@ -497,12 +497,7 @@ public class JID implements Comparable, Serializable, Externalizable {
return true;
}
public int compareTo(Object o) {
if (!(o instanceof JID)) {
throw new ClassCastException("Ojbect not instanceof JID: " + o);
}
JID jid = (JID)o;
public int compareTo(JID jid) {
// Comparison order is domain, node, resource.
int compare = domain.compareTo(jid.domain);
if (compare == 0 && node != null && jid.node != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment