commit | c5cd0d96c5a0eaddcd96087f8c58645a7dae8ee9 | [log] [tgz] |
---|---|---|
author | Ray Milkey <ray@onlab.us> | Fri Nov 14 14:05:36 2014 -0800 |
committer | Ray Milkey <ray@onlab.us> | Fri Nov 14 15:39:25 2014 -0800 |
tree | 7b054495febb0205c434ff4ba933f48a50be6bb6 | |
parent | 6ec682909cdf200b5747fb952dc90c4bdcfa8a57 [diff] |
Findbugs fixes Testing Sonar with a few findbugs fixes. Suppressing a false positive to see if it works. Change-Id: I0cdf2921198787adc56c680840aa00bdd254269b
diff --git a/apps/foo/src/main/java/org/onlab/onos/foo/FooComponent.java b/apps/foo/src/main/java/org/onlab/onos/foo/FooComponent.java index 1aa72fb..f40ae06 100644 --- a/apps/foo/src/main/java/org/onlab/onos/foo/FooComponent.java +++ b/apps/foo/src/main/java/org/onlab/onos/foo/FooComponent.java
@@ -210,7 +210,12 @@ } } int retry = 5; + do { + if (vv == null) { + log.error("Shouldn't reach here - value is null"); + break; + } ByteBuffer prev = ByteBuffer.wrap(vv.value()); long next = prev.getLong() + 1; byte[] newValue = ByteBuffer.allocate(Long.BYTES).putLong(next).array();
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/ClusterMessagingProtocolClient.java b/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/ClusterMessagingProtocolClient.java index 3dd93b9..f8c1be8 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/ClusterMessagingProtocolClient.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/ClusterMessagingProtocolClient.java
@@ -94,6 +94,9 @@ } @Override +// @edu.umd.cs.findbugs.annotations.SuppressWarnings +// (value="NP_NONNULL_PARAM_VIOLATION", +// justification="False positives on completedFuture call, passing null as a parameter is allowed") public synchronized CompletableFuture<Void> connect() { if (remoteNode != null) { // done