Add google's error prone static analysis to build
authorMaros Marsalek <[email protected]>
Thu, 14 Jul 2016 07:54:50 +0000 (09:54 +0200)
committerMaros Marsalek <[email protected]>
Thu, 14 Jul 2016 07:56:36 +0000 (09:56 +0200)
Can be also integrated with IDEs:
http://errorprone.info/docs/installation

Change-Id: I5f695995078139a077bd9d62c68792207c904e11
Signed-off-by: Maros Marsalek <[email protected]>
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfaces/ip/Ipv4NeighbourCustomizer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/interfacesstate/InterfaceUtils.java

index e01d4c1..99267dd 100644 (file)
@@ -88,7 +88,7 @@ public class Ipv4NeighbourCustomizer extends FutureJVppCustomizer
     public void updateCurrentAttributes(@Nonnull InstanceIdentifier<Neighbor> id, @Nonnull Neighbor dataBefore,
                                         @Nonnull Neighbor dataAfter,
                                         @Nonnull WriteContext writeContext) throws WriteFailedException {
-        new UnsupportedOperationException("Operation not supported");
+        throw new UnsupportedOperationException("Operation not supported");
     }
 
     @Override
index 4d1f5dd..7b4b2d0 100644 (file)
@@ -121,7 +121,7 @@ public final class InterfaceUtils {
         Objects.requireNonNull(vppPhysAddress, "Empty physical address bytes");
         final int endIndex = startIndex + PHYSICAL_ADDRESS_LENGTH;
         checkArgument(endIndex <= vppPhysAddress.length,
-            "Invalid physical address size (%s) for given startIndex (%d), expected >= %d", vppPhysAddress.length,
+            "Invalid physical address size (%s) for given startIndex (%s), expected >= %s", vppPhysAddress.length,
             startIndex, endIndex);
         StringBuilder physAddr = new StringBuilder();