Migrate users of Optional.get()
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / main / java / org / opendaylight / controller / cluster / raft / messages / IS.java
index df9884aaaad832005619f0932f5d45aa9f1da824..3247bb241ecad0da01ce35e9f7836f2d0011fbdb 100644 (file)
@@ -61,10 +61,10 @@ final class IS implements Externalizable {
         out.writeInt(installSnapshot.getTotalChunks());
 
         if (lastChunkHashCode.isPresent()) {
-            out.writeInt(lastChunkHashCode.getAsInt());
+            out.writeInt(lastChunkHashCode.orElseThrow());
         }
         if (serverConfig.isPresent()) {
-            out.writeObject(serverConfig.get());
+            out.writeObject(serverConfig.orElseThrow());
         }
 
         out.writeObject(installSnapshot.getData());