Skip to content

Commit

Permalink
Remove compare InvokerResourceMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
KeonHee committed May 25, 2021
1 parent 35262d4 commit d4a43d6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -440,34 +440,6 @@ case class InvokerResourceMessage(status: String,
* Serializes message to string. Must be idempotent.
*/
override def serialize: String = InvokerResourceMessage.serdes.write(this).compactPrint

def canEqual(a: Any) = a.isInstanceOf[InvokerResourceMessage]

override def equals(that: Any): Boolean =
that match {
case that: InvokerResourceMessage => {
that.canEqual(this) &&
this.status == that.status &&
this.freeMemory == that.freeMemory &&
this.busyMemory == that.busyMemory &&
this.inProgressMemory == that.inProgressMemory &&
this.tags.toSet == that.tags.toSet
this.dedicatedNamespaces.toSet == that.dedicatedNamespaces.toSet
}
case _ => false
}

override def hashCode: Int = {
var result = 1;
val prime = 31
result = prime * result + status.hashCode()
result = prime * result + freeMemory.hashCode()
result = prime * result + busyMemory.hashCode()
result = prime * result + inProgressMemory.hashCode()
result = prime * result + tags.hashCode()
result = prime * result + dedicatedNamespaces.hashCode()
result
}
}

object InvokerResourceMessage extends DefaultJsonProtocol {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import org.apache.openwhisk.spi.SpiLoader
import pureconfig._
import spray.json.DefaultJsonProtocol._
import spray.json._
import pureconfig.generic.auto._

import scala.concurrent.Await
import scala.concurrent.ExecutionContext.Implicits
Expand Down

0 comments on commit d4a43d6

Please sign in to comment.