- status: open --> closed
mofcomp (or the various UnsignedInt* types in
javax.wbem.cim) does not correctly deal with range
specifications in valuemaps.
The CIM Specification addendum version 2 (see dmtf
spec document DSP007) modifies the definition of
valuemap to include the possibility of ranges...
specifically, integer ranges specified as a start and end
integer separated by two dots.
As an example: the enabledstate valuemap in
CIM_EnabledLogicalElement in CIM Schema 2.7.2 final
(Core27_CoreElements.mof) has as one of its
elements: "11..32767". As of the DSP007 addendum,
this is a valid specification. However, the mofcomp
currently generates the corresponding line in the
equivalent java class as:
final static UnsignedInt16
ENABLEDSTATEVALUEMAP_DMTF_RESERVED =
new UnsignedInt16("11..32767");
Since UnsignedInt16 does not have a constructor that
allows for ranges, the mofcomp-generated
CIM_EnabledLogicalElement java class throws a
NumberFormatException when an attempt is made to
create a new instance.