This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: FYI: Classpath re-merge


I'm checking this in.
It is a minor Classpath re-merge.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	Re-merge with Classpath:
	* 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.

Index: java/lang/Integer.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Integer.java,v
retrieving revision 1.11
diff -u -r1.11 Integer.java
--- java/lang/Integer.java 2001/10/26 01:51:04 1.11
+++ java/lang/Integer.java 2001/11/16 19:50:27
@@ -176,7 +176,7 @@
     if (val == null) return def;
     try
       {
-      return decode(nm);
+      return decode(val);
       }
     catch (NumberFormatException e)
       {
@@ -363,6 +363,9 @@
     throws NumberFormatException
   {
     final int len;
+
+    if (str == null)
+      throw new NumberFormatException ();
 
     if ((len = str.length()) == 0 ||
         radix < Character.MIN_RADIX || radix > Character.MAX_RADIX)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]