Fix findbugs violations in library
[ovsdb.git] / library / impl / src / main / java / org / opendaylight / ovsdb / lib / operations / Mutate.java
index f09d20b80d170ea2e1bd2ed9d496dca8f617f4bd..5a586ce102e1f9163533279bb43167851f368ad1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015 Matt Oswalt and others. All rights reserved.
+ * Copyright © 2014, 2017 Matt Oswalt and others. All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -7,7 +7,8 @@
  */
 package org.opendaylight.ovsdb.lib.operations;
 
-import com.google.common.collect.Lists;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import java.util.ArrayList;
 import java.util.List;
 import org.opendaylight.ovsdb.lib.notation.Condition;
 import org.opendaylight.ovsdb.lib.notation.Mutation;
@@ -18,8 +19,8 @@ import org.opendaylight.ovsdb.lib.schema.TableSchema;
 public class Mutate<E extends TableSchema<E>> extends Operation<E> implements ConditionalOperation {
 
     public static final String MUTATE = "mutate";
-    List<Condition> where = Lists.newArrayList();
-    private List<Mutation> mutations = Lists.newArrayList();
+    List<Condition> where = new ArrayList<>();
+    private List<Mutation> mutations = new ArrayList<>();
 
     public Mutate on(TableSchema schema) {
         this.setTableSchema(schema);
@@ -30,6 +31,7 @@ public class Mutate<E extends TableSchema<E>> extends Operation<E> implements Co
         super(schema, MUTATE);
     }
 
+    @SuppressFBWarnings("RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT") // validate call below
     public <T extends TableSchema<T>, D> Mutate<E> addMutation(ColumnSchema<T, D> columnSchema,
                                                                Mutator mutator, D value) {
         columnSchema.validate(value);
@@ -63,4 +65,4 @@ public class Mutate<E extends TableSchema<E>> extends Operation<E> implements Co
     public void setWhere(List<Condition> where) {
         this.where = where;
     }
-}
\ No newline at end of file
+}