String.format() takes %s as a placeholder.
Change-Id: I1465b36b4d5ef56f25d3ee433450bbdd2ee97c3b
Signed-off-by: Robert Varga <rovarga@cisco.com>
import com.google.common.collect.Lists;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.SettableFuture;
import com.google.common.collect.Lists;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.SettableFuture;
+import java.util.Collections;
+import java.util.List;
import org.opendaylight.controller.cluster.datastore.messages.AbortTransaction;
import org.opendaylight.controller.cluster.datastore.messages.AbortTransactionReply;
import org.opendaylight.controller.cluster.datastore.messages.CanCommitTransaction;
import org.opendaylight.controller.cluster.datastore.messages.AbortTransaction;
import org.opendaylight.controller.cluster.datastore.messages.AbortTransactionReply;
import org.opendaylight.controller.cluster.datastore.messages.CanCommitTransaction;
import org.slf4j.LoggerFactory;
import scala.concurrent.Future;
import scala.runtime.AbstractFunction1;
import org.slf4j.LoggerFactory;
import scala.concurrent.Future;
import scala.runtime.AbstractFunction1;
-import java.util.Collections;
-import java.util.List;
/**
* ThreePhaseCommitCohortProxy represents a set of remote cohort proxies
/**
* ThreePhaseCommitCohortProxy represents a set of remote cohort proxies
} else {
LOG.error("Unexpected response type {}", response.getClass());
returnFuture.setException(new IllegalArgumentException(
} else {
LOG.error("Unexpected response type {}", response.getClass());
returnFuture.setException(new IllegalArgumentException(
- String.format("Unexpected response type {}", response.getClass())));
+ String.format("Unexpected response type %s", response.getClass())));
for(Object response: responses) {
if(!response.getClass().equals(expectedResponseClass)) {
exceptionToPropagate = new IllegalArgumentException(
for(Object response: responses) {
if(!response.getClass().equals(expectedResponseClass)) {
exceptionToPropagate = new IllegalArgumentException(
- String.format("Unexpected response type {}",
+ String.format("Unexpected response type %s",
response.getClass()));
break;
}
response.getClass()));
break;
}
} else {
// Throwing an exception here will fail the Future.
} else {
// Throwing an exception here will fail the Future.
- throw new IllegalArgumentException(String.format("Invalid reply type {}",
+ throw new IllegalArgumentException(String.format("Invalid reply type %s",
serializedReadyReply.getClass()));
}
}
serializedReadyReply.getClass()));
}
}
NormalizedNodeWriter.forStreamWriter(streamWriter).write(node);
streamWriter.writeYangInstanceIdentifier(path);
} catch (IOException e) {
NormalizedNodeWriter.forStreamWriter(streamWriter).write(node);
streamWriter.writeYangInstanceIdentifier(path);
} catch (IOException e) {
- throw new IllegalArgumentException(String.format("Error serializing path {} and Node {}",
+ throw new IllegalArgumentException(String.format("Error serializing path %s and Node %s",
NormalizedNodeWriter.forStreamWriter(streamWriter).write(node);
}
} catch (IOException e) {
NormalizedNodeWriter.forStreamWriter(streamWriter).write(node);
}
} catch (IOException e) {
- throw new IllegalArgumentException(String.format("Error serializing NormalizedNode {}",
+ throw new IllegalArgumentException(String.format("Error serializing NormalizedNode %s",