From: Robert Varga Date: Wed, 10 Oct 2018 15:13:42 +0000 (+0200) Subject: Remove the use of ActorIdentity.getRef() X-Git-Tag: release/neon~78 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=73f17e3e80b4e08ead5dc71065555994240a5c78 Remove the use of ActorIdentity.getRef() This method has been replaced with getActorRef(), which returns an Optional. Change-Id: I41e4c8f8ed06de87716c06077201287752c0e327 Signed-off-by: Robert Varga --- diff --git a/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/TestActorFactory.java b/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/TestActorFactory.java index ea38c16acc..c71c8b7de4 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/TestActorFactory.java +++ b/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/TestActorFactory.java @@ -5,7 +5,6 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.controller.cluster.raft; import akka.actor.Actor; @@ -152,7 +151,7 @@ public class TestActorFactory implements AutoCloseable { ActorSelection actorSelection = system.actorSelection(actorRef.path().toString()); Future future = Patterns.ask(actorSelection, new Identify(""), timeout); ActorIdentity reply = (ActorIdentity)Await.result(future, timeout.duration()); - Assert.assertNotNull("Identify returned null", reply.getRef()); + Assert.assertTrue("Identify returned non-present", reply.getActorRef().isPresent()); return; } catch (Exception | AssertionError e) { Uninterruptibles.sleepUninterruptibly(100, TimeUnit.MILLISECONDS);