diff options
Diffstat (limited to 'libjava/classpath/java/lang/Integer.java')
-rw-r--r-- | libjava/classpath/java/lang/Integer.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/libjava/classpath/java/lang/Integer.java b/libjava/classpath/java/lang/Integer.java index e5ca4b3428e..f379795ea3d 100644 --- a/libjava/classpath/java/lang/Integer.java +++ b/libjava/classpath/java/lang/Integer.java @@ -205,12 +205,12 @@ public final class Integer extends Number implements Comparable<Integer> // When the value is MIN_VALUE, it overflows when made positive if (num < 0) - { + { i = size = stringSize(MAX_VALUE, radix) + 2; buffer = new char[size]; - buffer[--i] = digits[(int) (-(num + radix) % radix)]; - num = -(num / radix); - } + buffer[--i] = digits[(int) (-(num + radix) % radix)]; + num = -(num / radix); + } else { i = size = stringSize(num, radix) + 1; @@ -704,9 +704,9 @@ public final class Integer extends Number implements Comparable<Integer> public static int reverseBytes(int val) { return ( ((val >> 24) & 0xff) - | ((val >> 8) & 0xff00) - | ((val << 8) & 0xff0000) - | ((val << 24) & 0xff000000)); + | ((val >> 8) & 0xff00) + | ((val << 8) & 0xff0000) + | ((val << 24) & 0xff000000)); } /** @@ -786,15 +786,15 @@ public final class Integer extends Number implements Comparable<Integer> if (ch == '-') { if (len == 1) - throw new NumberFormatException("pure '-'"); + throw new NumberFormatException("pure '-'"); isNeg = true; ch = str.charAt(++index); } else if (ch == '+') { - if (len == 1) - throw new NumberFormatException("pure '+'"); - ch = str.charAt(++index); + if (len == 1) + throw new NumberFormatException("pure '+'"); + ch = str.charAt(++index); } if (decode) { @@ -828,8 +828,8 @@ public final class Integer extends Number implements Comparable<Integer> int val = 0; while (index < len) { - if (val < 0 || val > max) - throw new NumberFormatException("number overflow (pos=" + index + ") : " + str); + if (val < 0 || val > max) + throw new NumberFormatException("number overflow (pos=" + index + ") : " + str); ch = Character.digit(str.charAt(index++), radix); val = val * radix + ch; |