@@ -178,14 +178,14 @@ public DoubleArrayDecoder getDoubleArrayDecoder()
178178public abstract static class DecoderBase
179179extends TypedValueDecoder
180180 {
181- final static long L_BILLION =1000000000 ;
181+ static final long L_BILLION =1000000000 ;
182182
183- final static long L_MAX_INT = ( long ) Integer .MAX_VALUE ;
183+ static final long L_MAX_INT =Integer .MAX_VALUE ;
184184
185- final static long L_MIN_INT = ( long ) Integer .MIN_VALUE ;
185+ static final long L_MIN_INT =Integer .MIN_VALUE ;
186186
187- final static BigInteger BD_MIN_LONG =BigInteger .valueOf (Long .MIN_VALUE );
188- final static BigInteger BD_MAX_LONG =BigInteger .valueOf (Long .MAX_VALUE );
187+ static final BigInteger BD_MIN_LONG =BigInteger .valueOf (Long .MIN_VALUE );
188+ static final BigInteger BD_MAX_LONG =BigInteger .valueOf (Long .MAX_VALUE );
189189
190190/**
191191 * Pointer to the next character to check, within lexical value
@@ -319,7 +319,7 @@ protected int skipSignAndZeroes(char[] lexical, char ch, boolean hasSign, final
319319 *
320320 * @return Parsed integer value
321321 */
322- protected final static int parseInt (char []digitChars ,int start ,int end )
322+ protected static final int parseInt (char []digitChars ,int start ,int end )
323323 {
324324/* This looks ugly, but appears to be the fastest way
325325 * (based on perf testing, profiling)
@@ -352,7 +352,7 @@ protected final static int parseInt(char[] digitChars, int start, int end)
352352return num ;
353353 }
354354
355- protected final static int parseInt (int num ,char []digitChars ,int start ,int end )
355+ protected static final int parseInt (int num ,char []digitChars ,int start ,int end )
356356 {
357357num = (num *10 ) + (digitChars [start ] -'0' );
358358if (++start <end ) {
@@ -379,7 +379,7 @@ protected final static int parseInt(int num, char[] digitChars, int start, int e
379379return num ;
380380 }
381381
382- protected final static int parseInt (String digitChars ,int start ,int end )
382+ protected static final int parseInt (String digitChars ,int start ,int end )
383383 {
384384int num =digitChars .charAt (start ) -'0' ;
385385if (++start <end ) {
@@ -409,7 +409,7 @@ protected final static int parseInt(String digitChars, int start, int end)
409409return num ;
410410 }
411411
412- protected final static int parseInt (int num ,String digitChars ,int start ,int end )
412+ protected static final int parseInt (int num ,String digitChars ,int start ,int end )
413413 {
414414num = (num *10 ) + (digitChars .charAt (start ) -'0' );
415415if (++start <end ) {
@@ -436,20 +436,20 @@ protected final static int parseInt(int num, String digitChars, int start, int e
436436return num ;
437437 }
438438
439- protected final static long parseLong (char []digitChars ,int start ,int end )
439+ protected static final long parseLong (char []digitChars ,int start ,int end )
440440 {
441441// Note: caller must ensure length is [10, 18]
442442int start2 =end -9 ;
443443long val =parseInt (digitChars ,start ,start2 ) *L_BILLION ;
444- return val +( long ) parseInt (digitChars ,start2 ,end );
444+ return val +parseInt (digitChars ,start2 ,end );
445445 }
446446
447- protected final static long parseLong (String digitChars ,int start ,int end )
447+ protected static final long parseLong (String digitChars ,int start ,int end )
448448 {
449449// Note: caller must ensure length is [10, 18]
450450int start2 =end -9 ;
451451long val =parseInt (digitChars ,start ,start2 ) *L_BILLION ;
452- return val +( long ) parseInt (digitChars ,start2 ,end );
452+ return val +parseInt (digitChars ,start2 ,end );
453453 }
454454
455455/*
@@ -492,7 +492,7 @@ protected String _clean(String str)
492492 /////////////////////////////////////////////////////
493493 */
494494
495- public final static class BooleanDecoder
495+ public static final class BooleanDecoder
496496extends DecoderBase
497497 {
498498protected boolean mValue ;
@@ -579,7 +579,7 @@ public void decode(char[] lexical, int start, int end)
579579 }
580580 }
581581
582- public final static class IntDecoder
582+ public static final class IntDecoder
583583extends DecoderBase
584584 {
585585protected int mValue ;
@@ -627,7 +627,7 @@ public void decode(String lexical) throws IllegalArgumentException
627627base +=L_BILLION ;
628628 }
629629int i =parseInt (lexical ,ptr ,ptr +charsLeft );
630- long l =base +( long ) i ;
630+ long l =base +i ;
631631if (neg ) {
632632l = -l ;
633633if (l >=L_MIN_INT ) {
@@ -682,7 +682,7 @@ public void decode(char[] lexical, final int start, final int end)
682682base +=L_BILLION ;
683683 }
684684int i =parseInt (lexical ,ptr ,ptr +charsLeft );
685- long l =base +( long ) i ;
685+ long l =base +i ;
686686if (neg ) {
687687l = -l ;
688688if (l >=L_MIN_INT ) {
@@ -700,7 +700,7 @@ public void decode(char[] lexical, final int start, final int end)
700700 }
701701 }
702702
703- public final static class LongDecoder
703+ public static final class LongDecoder
704704extends DecoderBase
705705 {
706706protected long mValue ;
@@ -731,15 +731,15 @@ public void decode(String lexical)
731731// Quick check for short (single-digit) values:
732732int charsLeft =end -ptr ;
733733if (charsLeft ==0 ) {
734- mValue = (long ) ( neg ? -nr :nr );
734+ mValue = (neg ? -nr :nr );
735735return ;
736736 }
737737verifyDigits (lexical ,ptr ,end );
738738// Note: charsLeft one less than total length (skipped first digit)
739739// Can parse more cheaply, if it's really just an int...
740740if (charsLeft <=8 ) {// no overflow
741741int i =parseInt (nr ,lexical ,ptr ,ptr +charsLeft );
742- mValue = (long ) ( neg ? -i :i );
742+ mValue = (neg ? -i :i );
743743return ;
744744 }
745745// At this point, let's just push back the first digit... simpler
@@ -777,7 +777,7 @@ public void decode(char[] lexical, final int start, final int end)
777777// Quick check for short (single-digit) values:
778778int charsLeft =end -ptr ;
779779if (charsLeft ==0 ) {
780- mValue = (long ) ( neg ? -nr :nr );
780+ mValue = (neg ? -nr :nr );
781781return ;
782782 }
783783verifyDigits (lexical ,start ,end ,ptr );
@@ -823,7 +823,7 @@ private long parseUsingBD(String lexical, boolean neg)
823823 }
824824 }
825825
826- public final static class FloatDecoder
826+ public static final class FloatDecoder
827827extends DecoderBase
828828 {
829829protected float mValue ;
@@ -915,7 +915,7 @@ public void decode(char[] lexical, int start, int end)
915915 }
916916 }
917917
918- public final static class DoubleDecoder
918+ public static final class DoubleDecoder
919919extends DecoderBase
920920 {
921921protected double mValue ;
@@ -1013,7 +1013,7 @@ public void decode(char[] lexical, int start, int end)
10131013 /////////////////////////////////////////////////////
10141014 */
10151015
1016- public final static class IntegerDecoder
1016+ public static final class IntegerDecoder
10171017extends DecoderBase
10181018 {
10191019protected BigInteger mValue ;
@@ -1047,7 +1047,7 @@ public void decode(char[] lexical, int start, int end) throws IllegalArgumentExc
10471047 }
10481048 }
10491049
1050- public final static class DecimalDecoder
1050+ public static final class DecimalDecoder
10511051extends DecoderBase
10521052 {
10531053protected BigDecimal mValue ;
@@ -1086,7 +1086,7 @@ public void decode(char[] lexical, int start, int end) throws IllegalArgumentExc
10861086 }
10871087 }
10881088
1089- public final static class QNameDecoder
1089+ public static final class QNameDecoder
10901090extends DecoderBase
10911091 {
10921092final NamespaceContext mNsCtxt ;
@@ -1141,7 +1141,7 @@ protected QName resolveQName(String localName) throws IllegalArgumentException
11411141protected QName resolveQName (String prefix ,String localName )
11421142throws IllegalArgumentException
11431143 {
1144- if (prefix .length ()== 0 ||localName .length () == 0 ) {
1144+ if (prefix .isEmpty () ||localName .isEmpty () ) {
11451145// either prefix or local name is empty String, illegal
11461146throw constructInvalidValue (prefix +":" +localName );
11471147 }
@@ -1150,7 +1150,7 @@ protected QName resolveQName(String prefix, String localName)
11501150 * namespace' has empty URI)
11511151 */
11521152String uri =mNsCtxt .getNamespaceURI (prefix );
1153- if (uri ==null ||uri .length () == 0 ) {
1153+ if (uri ==null ||uri .isEmpty () ) {
11541154throw new IllegalArgumentException ("Value\" " +lexicalDesc (prefix +":" +localName )+"\" not a valid QName: prefix '" +prefix +"' not bound to a namespace" );
11551155 }
11561156return new QName (uri ,localName ,prefix );
@@ -1177,13 +1177,13 @@ public abstract static class BaseArrayDecoder
11771177 * Let's use some modest array size for allocating initial
11781178 * result buffer
11791179 */
1180- protected final static int INITIAL_RESULT_BUFFER_SIZE =40 ;
1180+ protected static final int INITIAL_RESULT_BUFFER_SIZE =40 ;
11811181
11821182/**
11831183 * When expanding 'small' result buffers, we will expand
11841184 * size by bigger factor than for larger ones.
11851185 */
1186- protected final static int SMALL_RESULT_BUFFER_SIZE =4000 ;
1186+ protected static final int SMALL_RESULT_BUFFER_SIZE =4000 ;
11871187
11881188protected int mStart ;
11891189
@@ -1223,7 +1223,7 @@ protected int calcNewSize(int currSize)
12231223 }
12241224 }
12251225
1226- public final static class IntArrayDecoder
1226+ public static final class IntArrayDecoder
12271227extends BaseArrayDecoder
12281228 {
12291229int []mResult ;
@@ -1291,7 +1291,7 @@ public boolean decodeValue(char[] buffer, int start, int end) throws IllegalArgu
12911291
12921292 }
12931293
1294- public final static class LongArrayDecoder
1294+ public static final class LongArrayDecoder
12951295extends BaseArrayDecoder
12961296 {
12971297long []mResult ;
@@ -1349,7 +1349,7 @@ public boolean decodeValue(char[] buffer, int start, int end) throws IllegalArgu
13491349 }
13501350 }
13511351
1352- public final static class FloatArrayDecoder
1352+ public static final class FloatArrayDecoder
13531353extends BaseArrayDecoder
13541354 {
13551355float []mResult ;
@@ -1407,7 +1407,7 @@ public boolean decodeValue(char[] buffer, int start, int end) throws IllegalArgu
14071407 }
14081408 }
14091409
1410- public final static class DoubleArrayDecoder
1410+ public static final class DoubleArrayDecoder
14111411extends BaseArrayDecoder
14121412 {
14131413double []mResult ;