diff --git a/src/java.base/share/classes/java/lang/Integer.java b/src/java.base/share/classes/java/lang/Integer.java index 2e33818963d32..60677f23de0fa 100644 --- a/src/java.base/share/classes/java/lang/Integer.java +++ b/src/java.base/share/classes/java/lang/Integer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -627,7 +627,7 @@ public static int parseInt(String s, int radix) */ if (s == null) { - throw new NumberFormatException("null"); + throw new NumberFormatException("Cannot parse null string"); } if (radix < Character.MIN_RADIX) { @@ -832,7 +832,7 @@ public static int parseInt(String s) throws NumberFormatException { public static int parseUnsignedInt(String s, int radix) throws NumberFormatException { if (s == null) { - throw new NumberFormatException("null"); + throw new NumberFormatException("Cannot parse null string"); } int len = s.length(); diff --git a/src/java.base/share/classes/java/lang/Long.java b/src/java.base/share/classes/java/lang/Long.java index 8965032101831..d85c8966f4f0b 100644 --- a/src/java.base/share/classes/java/lang/Long.java +++ b/src/java.base/share/classes/java/lang/Long.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -682,7 +682,7 @@ public static long parseLong(String s, int radix) throws NumberFormatException { if (s == null) { - throw new NumberFormatException("null"); + throw new NumberFormatException("Cannot parse null string"); } if (radix < Character.MIN_RADIX) { @@ -893,7 +893,7 @@ public static long parseLong(String s) throws NumberFormatException { public static long parseUnsignedLong(String s, int radix) throws NumberFormatException { if (s == null) { - throw new NumberFormatException("null"); + throw new NumberFormatException("Cannot parse null string"); } int len = s.length();