summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-16 19:52:24 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-16 19:52:24 +0000
commit5a1a4aa3f1406e7b907621c52238ab90bccb0ec3 (patch)
tree24bf36c68ab6e2699d0d81c74950f12b9a6771a2
parent1f5ebd87a351fbcfd03231299e2435274ae8994a (diff)
downloadppe42-gcc-5a1a4aa3f1406e7b907621c52238ab90bccb0ec3.tar.gz
ppe42-gcc-5a1a4aa3f1406e7b907621c52238ab90bccb0ec3.zip
Re-merge with Classpath, from Brian Jones:
* java/lang/Integer.java (getInteger): Attempt to decode the value of the system property instead of the name of the system property. (parseInt): Throw NumberFormatException explicitly in the case of a null argument in keeping with JDK 1.3. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47095 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libjava/ChangeLog8
-rw-r--r--libjava/java/lang/Integer.java5
2 files changed, 12 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 02fa0b36da7..31373d6c620 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,11 @@
+2001-11-16 Tom Tromey <tromey@redhat.com>
+
+ Re-merge with Classpath, from Brian Jones:
+ * java/lang/Integer.java (getInteger): Attempt to decode the value
+ of the system property instead of the name of the system property.
+ (parseInt): Throw NumberFormatException explicitly in the case of
+ a null argument in keeping with JDK 1.3.
+
2001-11-16 Mark Wielaard <mark@klomp.org>
* java/util/Timer.java (TaskQueue.isStopped): Remove method.
diff --git a/libjava/java/lang/Integer.java b/libjava/java/lang/Integer.java
index afa42a439f6..ad53dab3b4c 100644
--- a/libjava/java/lang/Integer.java
+++ b/libjava/java/lang/Integer.java
@@ -176,7 +176,7 @@ public final class Integer extends Number implements Comparable
if (val == null) return def;
try
{
- return decode(nm);
+ return decode(val);
}
catch (NumberFormatException e)
{
@@ -364,6 +364,9 @@ public final class Integer extends Number implements Comparable
{
final int len;
+ if (str == null)
+ throw new NumberFormatException ();
+
if ((len = str.length()) == 0 ||
radix < Character.MIN_RADIX || radix > Character.MAX_RADIX)
throw new NumberFormatException();
OpenPOWER on IntegriCloud