Permalink
Browse files

ISPN-2301 Fix compilation error introduced by the ISPN-2301 fix

  • Loading branch information...
danberindei authored and tristantarrant committed Oct 12, 2012
1 parent 941be76 commit 69738b5e53d54b0709486c3406a5846d16f614e1
Showing with 12 additions and 0 deletions.
  1. +12 −0 server/hotrod/src/main/scala/org/infinispan/server/hotrod/ServerAddress.scala
@@ -72,6 +72,18 @@ class ServerAddress(val host: String, val port: Int) extends Address {
override def toString = "%s:%d".format(host, port)
+ def compareTo(o: Address) : Int = {
+ o match {
+ case oa : ServerAddress => {
+ var cmp = host.compareTo(oa.host)
+ if (cmp == 0) {
+ cmp = port - oa.port
+ }
+ cmp
+ }
+ case _ => 0
+ }
+ }
}
object ServerAddress {

0 comments on commit 69738b5

Please sign in to comment.