From 70110f65759da238a1fe1980bade88c3430234a2 Mon Sep 17 00:00:00 2001 From: Madhu Venugopal Date: Thu, 9 Jan 2014 21:06:34 -0800 Subject: [PATCH] Fixing the ColumnSchema as per RFC7047 for a enum variable. Enums are defined as a 1 or more atomic-type and hence the current Object[] is incorrect and is causing deser issues with vtep schema. Fixing it with a more generic Object. This will be properly accomodated when we have schema driven OVSDB approach is in place. Change-Id: I0c1d2896ea34bbc3c358ca0d0818860908e0b1b1 Signed-off-by: Madhu Venugopal --- .../opendaylight/ovsdb/lib/database/OvsdbType.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ovsdb/src/main/java/org/opendaylight/ovsdb/lib/database/OvsdbType.java b/ovsdb/src/main/java/org/opendaylight/ovsdb/lib/database/OvsdbType.java index dafc5a4f9..f7b3ee85d 100644 --- a/ovsdb/src/main/java/org/opendaylight/ovsdb/lib/database/OvsdbType.java +++ b/ovsdb/src/main/java/org/opendaylight/ovsdb/lib/database/OvsdbType.java @@ -9,9 +9,7 @@ */ package org.opendaylight.ovsdb.lib.database; -import java.util.Arrays; - -import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class OvsdbType { @@ -28,6 +26,7 @@ public class OvsdbType { private String name; + @Override public String toString() { return name; } @@ -55,7 +54,7 @@ public class OvsdbType { this.type = type; } - public BaseType(@JsonProperty("type") String type, @JsonProperty("enum") Object[] ovsdbEnum, + public BaseType(@JsonProperty("type") String type, @JsonProperty("enum") Object ovsdbEnum, @JsonProperty("minInteger") Integer minInteger, @JsonProperty("maxInteger") Integer maxInteger, @JsonProperty("minReal") Double minReal, @JsonProperty("maxReal") Double maxReal, @JsonProperty("minLength") Integer minLength, @JsonProperty("maxLength") Integer maxLength, @@ -73,7 +72,7 @@ public class OvsdbType { } public String type; - public Object[] ovsdbEnum; + public Object ovsdbEnum; public Integer minInteger; public Integer maxInteger; public Double minReal; @@ -85,7 +84,7 @@ public class OvsdbType { @Override public String toString() { return "BaseType [type=" + type + ", ovsdbEnum=" - + Arrays.toString(ovsdbEnum) + ", minInteger=" + minInteger + + ovsdbEnum + ", minInteger=" + minInteger + ", maxInteger=" + maxInteger + ", minReal=" + minReal + ", maxReal=" + maxReal + ", minLength=" + minLength + ", maxLength=" + maxLength + ", refTable=" + refTable -- 2.36.6