Patch: merge several Number classes with Classpath

Tom Tromey tromey@redhat.com
Tue Jul 24 07:31:00 GMT 2001


>>>>> "Mark" == Mark Wielaard <mark@klomp.org> writes:

Mark> Note that you always return int.class.

Thanks.  I should be suprised that our test suite didn't catch this,
but unfortunately I'm not.

Patch appended.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* java/lang/VMClassLoader.java (getPrimitiveClass): Return correct
	type.

2001-07-23  Tom Tromey  <tromey@redhat.com>

Index: java/lang/VMClassLoader.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/VMClassLoader.java,v
retrieving revision 1.3
diff -u -r1.3 VMClassLoader.java
--- java/lang/VMClassLoader.java 2001/07/23 20:01:28 1.3
+++ java/lang/VMClassLoader.java 2001/07/24 14:30:19
@@ -65,21 +65,21 @@
     if ("int".equals (type))
       return int.class;
     else if ("long".equals (type))
-      return int.class;
+      return long.class;
     else if ("boolean".equals (type))
-      return int.class;
+      return boolean.class;
     else if ("short".equals (type))
-      return int.class;
+      return short.class;
     else if ("char".equals (type))
-      return int.class;
+      return char.class;
     else if ("byte".equals (type))
-      return int.class;
+      return byte.class;
     else if ("float".equals (type))
-      return int.class;
+      return float.class;
     else if ("double".equals (type))
-      return int.class;
+      return double.class;
     else if ("void".equals (type))
-      return int.class;
+      return void.class;
     return null;
   }
 }



More information about the Java-patches mailing list