# HG changeset patch # User alanb # Date 1407851856 -3600 # Node ID ae524ae51679bee2405363cdac17693715f4ace1 # Parent 76e7de7a6ef7335dbe3d99db5ea3a7ac35e0a73b 8054828: TEST_BUG: Typos in java/lang/Long/ParsingTest Reviewed-by: alanb Contributed-by: claes.redestad@oracle.com diff -r 76e7de7a6ef7 -r ae524ae51679 jdk/test/java/lang/Long/ParsingTest.java --- a/jdk/test/java/lang/Long/ParsingTest.java Tue Aug 12 00:13:57 2014 +0400 +++ b/jdk/test/java/lang/Long/ParsingTest.java Tue Aug 12 14:57:36 2014 +0100 @@ -128,10 +128,10 @@ } private static void checkNumberFormatException(String val, int radix, int start) { - int n = 0; + long n = 0; try { - n = Integer.parseInt(val, radix, start); - System.err.println("parseInt(" + val + ", " + radix + ", " + start + + n = Long.parseLong(val, radix, start); + System.err.println("parseLong(" + val + ", " + radix + ", " + start + ") incorrectly returned " + n); throw new RuntimeException(); } catch (NumberFormatException nfe) { @@ -143,7 +143,7 @@ long n = 0; try { n = Long.parseLong(val, radix, start, end); - System.err.println("parseInt(" + val + ", " + radix + ", " + start + ", " + end + + System.err.println("parseLong(" + val + ", " + radix + ", " + start + ", " + end + ") incorrectly returned " + n); throw new RuntimeException(); } catch (NumberFormatException nfe) { @@ -152,10 +152,10 @@ } private static void checkIndexOutOfBoundsException(String val, int radix, int start) { - int n = 0; + long n = 0; try { - n = Integer.parseInt(val, radix, start); - System.err.println("parseInt(" + val + ", " + radix + ", " + start + + n = Long.parseLong(val, radix, start); + System.err.println("parseLong(" + val + ", " + radix + ", " + start + ") incorrectly returned " + n); throw new RuntimeException(); } catch (IndexOutOfBoundsException ioob) { @@ -167,7 +167,7 @@ long n = 0; try { n = Long.parseLong(val, radix, start, end); - System.err.println("parseInt(" + val + ", " + radix + ", " + start + ", " + end + + System.err.println("parseLong(" + val + ", " + radix + ", " + start + ", " + end + ") incorrectly returned " + n); throw new RuntimeException(); } catch (IndexOutOfBoundsException ioob) { @@ -179,7 +179,7 @@ long n = 0; try { n = Long.parseLong(null, 10, start, end); - System.err.println("parseInt(null, " + radix + ", " + start + ", " + end + + System.err.println("parseLong(null, " + radix + ", " + start + ", " + end + ") incorrectly returned " + n); throw new RuntimeException(); } catch (NullPointerException npe) {