@@ -195,9 +195,9 @@ else if (!isUnsigned(numInGroupType.primitiveType()))
195
195
}
196
196
else if (numInGroupMinValue .longValue () < 0 )
197
197
{
198
- XmlSchemaParser .handleError (node , String . format (
199
- "\" numInGroup\" minValue=%s must be greater than zero " +
200
- "for signed \" numInGroup\" types" , numInGroupMinValue ) );
198
+ XmlSchemaParser .handleError (node ,
199
+ "\" numInGroup\" minValue=" + numInGroupMinValue + " must be greater than zero " +
200
+ "for signed \" numInGroup\" types" );
201
201
}
202
202
}
203
203
else
@@ -218,8 +218,8 @@ else if (numInGroupMinValue.longValue() < 0)
218
218
219
219
if (numInGroupMinValue .longValue () > max )
220
220
{
221
- XmlSchemaParser .handleError (node , String . format (
222
- "\" numInGroup\" minValue=%s greater than maxValue=%d" , numInGroupMinValue , max ) );
221
+ XmlSchemaParser .handleError (
222
+ node , "\" numInGroup\" minValue=" + numInGroupMinValue + " greater than maxValue=" + max );
223
223
}
224
224
}
225
225
}
@@ -275,22 +275,22 @@ private static void validateGroupMaxValue(
275
275
final long allowedValue = primitiveType .maxValue ().longValue ();
276
276
if (longValue > allowedValue )
277
277
{
278
- XmlSchemaParser .handleError (node , String . format (
279
- "maxValue greater than allowed for type: maxValue=%d allowed=%d" , longValue , allowedValue ) );
278
+ XmlSchemaParser .handleError (
279
+ node , "maxValue greater than allowed for type: maxValue=" + longValue + " allowed=" + allowedValue );
280
280
}
281
281
282
282
final long maxInt = INT32 .maxValue ().longValue ();
283
283
if (primitiveType == UINT32 && longValue > maxInt )
284
284
{
285
- XmlSchemaParser .handleError (node , String . format (
286
- "maxValue greater than allowed for type: maxValue=%d allowed=%d" , longValue , maxInt ) );
285
+ XmlSchemaParser .handleError (
286
+ node , "maxValue greater than allowed for type: maxValue=" + longValue + " allowed=" + maxInt );
287
287
}
288
288
}
289
289
else if (primitiveType == UINT32 )
290
290
{
291
291
final long maxInt = INT32 .maxValue ().longValue ();
292
- XmlSchemaParser .handleError (node , String . format (
293
- "maxValue must be set for varData UINT32 type: max value allowed=%d" , maxInt ) );
292
+ XmlSchemaParser .handleError (
293
+ node , "maxValue must be set for varData UINT32 type: max value allowed=" + maxInt );
294
294
}
295
295
}
296
296
@@ -333,33 +333,25 @@ private void validateHeaderField(
333
333
{
334
334
if (actualType == null )
335
335
{
336
- XmlSchemaParser .handleError (
337
- node ,
338
- String .format ("composite for message header must have \" %s\" " , fieldName ));
336
+ XmlSchemaParser .handleError (node , "composite for message header must have \" " + fieldName + "\" " );
339
337
}
340
338
else if (actualType .primitiveType () != expectedType )
341
339
{
342
- XmlSchemaParser .handleWarning (node , String . format ( "\" %s \" should be %s" , fieldName , expectedType .name () ));
340
+ XmlSchemaParser .handleWarning (node , "\" " + fieldName + " \" should be " + expectedType .name ());
343
341
344
342
if (shouldGenerateInterfaces )
345
343
{
346
344
if (actualType .primitiveType ().size () > expectedType .size ())
347
345
{
348
- XmlSchemaParser .handleError (
349
- node ,
350
- String .format ("\" %s\" must be less than %s bytes to use %s" ,
351
- fieldName ,
352
- expectedType .size (),
353
- JAVA_GENERATE_INTERFACES ));
346
+ final String msg = "\" " + fieldName + "\" must be less than " + expectedType .size () +
347
+ " bytes to use " + JAVA_GENERATE_INTERFACES ;
348
+ XmlSchemaParser .handleError (node , msg );
354
349
}
355
350
else
356
351
{
357
- XmlSchemaParser .handleWarning (
358
- node ,
359
- String .format ("\" %s\" will be cast to %s to use %s" ,
360
- fieldName ,
361
- expectedType .name (),
362
- JAVA_GENERATE_INTERFACES ));
352
+ final String msg = "\" " + fieldName + "\" will be cast to " + expectedType .name () +
353
+ " to use " + JAVA_GENERATE_INTERFACES ;
354
+ XmlSchemaParser .handleWarning (node , msg );
363
355
}
364
356
}
365
357
}
@@ -383,8 +375,7 @@ public void checkForValidOffsets(final Node node)
383
375
if (offsetAttribute < offset )
384
376
{
385
377
XmlSchemaParser .handleError (
386
- node ,
387
- String .format ("composite element \" %s\" has incorrect offset specified" , edt .name ()));
378
+ node , "composite element \" " + edt .name () + "\" has incorrect offset specified" );
388
379
}
389
380
390
381
offset = offsetAttribute ;
@@ -434,8 +425,8 @@ private Type processType(
434
425
{
435
426
final XPath xPath = XPathFactory .newInstance ().newXPath ();
436
427
final String refTypeName = XmlSchemaParser .getAttributeValue (subTypeNode , "type" );
437
- final Node refTypeNode = ( Node ) xPath . compile (
438
- "/*[local-name() = 'messageSchema']/types/*[@name='" + refTypeName + "']" )
428
+ final String expression = "/*[local-name() = 'messageSchema']/types/*[@name='" + refTypeName + "']" ;
429
+ final Node refTypeNode = ( Node ) xPath . compile ( expression )
439
430
.evaluate (subTypeNode .getOwnerDocument (), XPathConstants .NODE );
440
431
441
432
if (refTypeNode == null )
0 commit comments