Fixed a bug introduced due to a recent commit. Thanks to Integration tests, we were... 03/7403/1
authorMadhu Venugopal <mavenugo@gmail.com>
Mon, 26 May 2014 17:24:29 +0000 (10:24 -0700)
committerMadhu Venugopal <mavenugo@gmail.com>
Mon, 26 May 2014 17:24:29 +0000 (10:24 -0700)
We need to add good Asserts to catch and Fail Verify and Merge jobs. That will prevent from these happening.
We are waiting on the Mutate operation to et merged before we could write better Asserts.

Change-Id: I62e42c27032b8502937394d50934c2cf4038eed9
Signed-off-by: Madhu Venugopal <mavenugo@gmail.com>
library/src/main/java/org/opendaylight/ovsdb/lib/operations/Insert.java

index 899d07210864c22683789622a5689826ee6b2d8d..fc99e92cb0f3ef80cffbda362e13e2c45edd50ca 100644 (file)
@@ -9,15 +9,16 @@
  */
 package org.opendaylight.ovsdb.lib.operations;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Maps;
+import java.util.Map;
+import java.util.Set;
+
 import org.opendaylight.ovsdb.lib.notation.OvsDBSet;
 import org.opendaylight.ovsdb.lib.schema.ColumnSchema;
 import org.opendaylight.ovsdb.lib.schema.TableSchema;
 
-import java.util.Map;
-import java.util.Set;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Maps;
 
 
 public class Insert<E extends TableSchema<E>> extends Operation<E> {
@@ -52,6 +53,8 @@ public class Insert<E extends TableSchema<E>> extends Operation<E> {
         if (columnSchema.getType().isMultiValued()) {
             Preconditions.checkArgument((value instanceof Set),"expected a set for multivalued item") ;
             tval = OvsDBSet.fromSet((Set) value);
+        } else {
+            tval = value;
         }
         row.put(columnSchema.getName(), tval);
         return this;