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:
parent
19788583ee
commit
7325c729ce
84 changed files with 158 additions and 158 deletions
|
|
@ -742,7 +742,7 @@ trait TestKitBase {
|
|||
|
||||
var elem: AnyRef = queue.peekFirst()
|
||||
var left = leftNow
|
||||
while (left.toNanos > 0 && elem == null) {
|
||||
while (left.toNanos > 0 && (elem eq null)) {
|
||||
// Use of (left / 2) gives geometric series limited by finish time similar to (1/2)^n limited by 1,
|
||||
// so it is very precise
|
||||
Thread.sleep(pollInterval.toMillis min (left / 2).toMillis)
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class EventFilter(clazz: Class[_], system: ActorSystem) {
|
|||
def intercept[T](code: Supplier[T]): T = {
|
||||
val filter: pekko.testkit.EventFilter =
|
||||
if (_clazz eq classOf[Logging.Error]) {
|
||||
if (exceptionType == null) exceptionType = Logging.noCause.getClass
|
||||
if (exceptionType eq null) exceptionType = Logging.noCause.getClass
|
||||
new ErrorFilter(exceptionType, source, message, pattern, complete, occurrences)
|
||||
} else if (_clazz eq classOf[Logging.Warning]) {
|
||||
new WarningFilter(source, message, pattern, complete, occurrences)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue