X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fmessages%2FDataExists.java;h=1bd687cbb7576c65513cafd8e4823c502914bcb5;hp=db62547d424506efb26236610e9d1567e032e6fd;hb=925cb4a228d0fda99c7bfeb432eb25285a223887;hpb=cab1d5845cb951fe31a3243653ed567583dc73c1 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/DataExists.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/DataExists.java index db62547d42..1bd687cbb7 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/DataExists.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/DataExists.java @@ -32,10 +32,11 @@ public class DataExists extends AbstractRead { @Override public void processResponse(Object response, SettableFuture returnFuture) { - if(DataExistsReply.isSerializedType(response)) { + if (DataExistsReply.isSerializedType(response)) { returnFuture.set(Boolean.valueOf(DataExistsReply.fromSerializable(response).exists())); } else { - returnFuture.setException(new ReadFailedException("Invalid response checking exists for path " + getPath())); + returnFuture.setException(new ReadFailedException("Invalid response checking exists for path " + + getPath())); } } @@ -44,7 +45,7 @@ public class DataExists extends AbstractRead { return new DataExists(getPath(), withVersion); } - public static DataExists fromSerializable(final Object serializable){ + public static DataExists fromSerializable(final Object serializable) { Preconditions.checkArgument(serializable instanceof DataExists); return (DataExists)serializable; }