OpenZWave / Thrift4OZW

A daemon exposing the OpenZWave API via Apache Thrift (and some useful tools)
27 stars 13 forks source link

Repeated values in RemoteValueType enum #4

Closed mattinbits closed 11 years ago

mattinbits commented 11 years ago

Hi,

In RemoteValueType enum in the thrift definition, the value 8 represents ValueType_Button and ValueType_Max.

This creates an issue in the generated Java code of RemoteValueType.java since it produces a case statement which repeats the case of value 8.

Not sure whether this is problem with the enum specification in the Thrift file, or a problem with the generated Java not handling a valid instance of a repeated value.

Matt

ekarak commented 11 years ago

I assume min and max are only used in C/C++ to check if you get an integer from the outside world inside these bounds, so you can safely remove them from the ozw.thrift file. Feel free to patch me up!

ekarak commented 11 years ago

patched up, closing