Make use of eq and ne. (#1994)

* chore: make use of eq instead of ==

* chore: make use of ne instead of !=
This commit is contained in:
He-Pin(kerr) 2025-08-03 17:32:32 +08:00 committed by GitHub
parent 19788583ee
commit 7325c729ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
84 changed files with 158 additions and 158 deletions

View file

@ -69,7 +69,7 @@ import pekko.util.OptionVal
}
@tailrec private def isAllowedSpringClass(clazz: Class[_]): Boolean = {
if (clazz == null || clazz.equals(classOf[java.lang.Object]))
if ((clazz eq null) || clazz.equals(classOf[java.lang.Object]))
true
else {
val name = clazz.getSimpleName
@ -88,7 +88,7 @@ import pekko.util.OptionVal
Set(classOf[java.io.Serializable], classOf[java.io.Serializable], classOf[java.lang.Comparable[_]])
def isGZipped(bytes: Array[Byte]): Boolean = {
(bytes != null) && (bytes.length >= 2) &&
(bytes ne null) && (bytes.length >= 2) &&
(bytes(0) == GZIPInputStream.GZIP_MAGIC.toByte) &&
(bytes(1) == (GZIPInputStream.GZIP_MAGIC >> 8).toByte)
}