Fixed Enum processing in BaseType 74/8274/1
authorMadhu Venugopal <mavenugo@gmail.com>
Tue, 24 Jun 2014 04:05:00 +0000 (21:05 -0700)
committerMadhu Venugopal <mavenugo@gmail.com>
Tue, 24 Jun 2014 04:05:00 +0000 (21:05 -0700)
commit277e2a5829a02febaca2a5594aa2952cbed13d36
treee01d69d2773d41ef09045e08da2632ed46839124
parenta8762c26d9001c8fda1ae3eb017d927e31894108
Fixed Enum processing in BaseType

There is an incorrect assumption that all Enum types will be a Set/Array.
Thanks to the minimal IT written for hardware_vtep, this assumption is caught for an enum type for "encapsulation_type" field :
"type": { "key": { "enum": "vxlan_over_ipv4", "type": "string" } }

The incorrect assumption caused null pointer exception on the IT run.
Caused by: java.lang.NullPointerException: null
at org.opendaylight.ovsdb.lib.schema.BaseType$StringBaseType.populateEnum(BaseType.java:307)

This fix addresses that problem.

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