Migrate away from Throwables.propagate() 17/84617/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 20 Aug 2019 22:31:55 +0000 (00:31 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 23 Sep 2019 05:50:35 +0000 (07:50 +0200)
This method has been deprecated, move off of it.

Change-Id: Ida34fb165dad1c0cf1786c773325e077de53a4c2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 9c8276bd8fff1367dfb50400f71437602531c7a2)
(cherry picked from commit d826e994fcccc85db9f1651a9b1b68c25d9a002c)

opendaylight/md-sal/sal-akka-raft-example/src/main/java/org/opendaylight/controller/cluster/example/ExampleActor.java

index a2bcc8a724f68ec05f2c9c57440084fb8368dcb6..0c4bdf4b8f5626278ecc1c3633e3daef8d7ea0c2 100644 (file)
@@ -5,13 +5,11 @@
  * 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.example;
 
 import akka.actor.ActorRef;
 import akka.actor.Props;
 import com.google.common.base.Optional;
-import com.google.common.base.Throwables;
 import com.google.common.io.ByteSource;
 import java.io.IOException;
 import java.io.OutputStream;
@@ -204,7 +202,7 @@ public class ExampleActor extends RaftActor implements RaftActorRecoveryCohort,
         try {
             return new MapState((Map<String, String>) SerializationUtils.deserialize(snapshotBytes.read()));
         } catch (IOException e) {
-            throw Throwables.propagate(e);
+            throw new RuntimeException(e);
         }
     }