File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
sbe-tool/src/main/java/uk/co/real_logic/sbe/xml Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -184,7 +184,18 @@ else if (!isUnsigned(blockLengthType.primitiveType()))
184184 }
185185 else if (!isUnsigned (numInGroupType .primitiveType ()))
186186 {
187- XmlSchemaParser .handleError (node , "\" numInGroup\" must be unsigned type" );
187+ XmlSchemaParser .handleWarning (node , "\" numInGroup\" should be unsigned type" );
188+ final PrimitiveValue numInGroupMinValue = numInGroupType .minValue ();
189+ if (null == numInGroupMinValue )
190+ {
191+ XmlSchemaParser .handleError (node , "\" numInGroup\" minValue must be set for signed types" );
192+ }
193+ else if (numInGroupMinValue .longValue () < 0 )
194+ {
195+ XmlSchemaParser .handleError (node , String .format (
196+ "\" numInGroup\" minValue=%s must be greater than zero " +
197+ "for signed \" numInGroup\" types" , numInGroupMinValue ));
198+ }
188199 }
189200 else
190201 {
You can’t perform that action at this time.
0 commit comments