[kaffe] CVS kaffe (guilhem): Serialization fixes merged from GNU Classpath.
Kaffe CVS
cvs-commits at kaffe.org
Mon Dec 6 10:27:44 PST 2004
PatchSet 5549
Date: 2004/12/06 17:39:38
Author: guilhem
Branch: HEAD
Tag: (none)
Log:
Serialization fixes merged from GNU Classpath.
* include/Makefile.am,
include/Makefile.in: Generate JNI headers for ObjectInputStream
and VMObjectStreamClass now.
* libraries/javalib/Klasses.jar.bootstrap: Regenerated.
* test/regression/TestSerializable2.java: Updated to match new
error values.
* java/io/ObjectInputStream.java,
java/io/ObjectStreamClass.java,
libraries/clib/io/java_io_ObjectInputStream.c:
Resynced with GNU Classpath.
2004-12-06 Guilhem Lavaux <guilhem at kaffe.org>
Jeroen Frijters <jeroen at frijters.net>
* java/io/ObjectInputStream.java
(newObject): Changed prototype. Get a constructor reflect object
directly.
(callConstructor): Removed.
(allocateObject): Changed prototype.
(readClassDescriptor): Build the constructor reflection directly.
(readObject): Invoke newObject using the new prototype.
* java/io/ObjectStreamClass.java
(firstNonSerializableParent): Removed.
(firstNonSerializableParentConstructor): Added.
* include/java_io_ObjectInputStream.h: Regenerated.
* native/jni/java-io/java_io_ObjectInputStream.c
(allocateObject): Allocate an object and call the requested
constructor.
(callConstructor): Removed.
Members:
ChangeLog:1.3095->1.3096
libraries/clib/io/java_io_ObjectInputStream.c:1.1->1.2
libraries/javalib/Klasses.jar.bootstrap:1.74->1.75
libraries/javalib/java/io/ObjectInputStream.java:1.44->1.45
libraries/javalib/java/io/ObjectStreamClass.java:1.28->1.29
test/regression/TestSerializable2.java:1.2->1.3
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3095 kaffe/ChangeLog:1.3096
--- kaffe/ChangeLog:1.3095 Mon Dec 6 13:24:45 2004
+++ kaffe/ChangeLog Mon Dec 6 17:39:38 2004
@@ -1,3 +1,41 @@
+2004-12-06 Guilhem Lavaux <guilhem at kaffe.org>
+
+ * include/Makefile.am,
+ include/Makefile.in: Generate JNI headers for ObjectInputStream
+ and VMObjectStreamClass now.
+
+ * libraries/javalib/Klasses.jar.bootstrap: Regenerated.
+
+ * test/regression/TestSerializable2.java: Updated to match new
+ error values.
+
+ * java/io/ObjectInputStream.java,
+ java/io/ObjectStreamClass.java,
+ libraries/clib/io/java_io_ObjectInputStream.c:
+ Resynced with GNU Classpath.
+
+ 2004-12-06 Guilhem Lavaux <guilhem at kaffe.org>
+ Jeroen Frijters <jeroen at frijters.net>
+
+ * java/io/ObjectInputStream.java
+ (newObject): Changed prototype. Get a constructor reflect object
+ directly.
+ (callConstructor): Removed.
+ (allocateObject): Changed prototype.
+ (readClassDescriptor): Build the constructor reflection directly.
+ (readObject): Invoke newObject using the new prototype.
+
+ * java/io/ObjectStreamClass.java
+ (firstNonSerializableParent): Removed.
+ (firstNonSerializableParentConstructor): Added.
+
+ * include/java_io_ObjectInputStream.h: Regenerated.
+
+ * native/jni/java-io/java_io_ObjectInputStream.c
+ (allocateObject): Allocate an object and call the requested
+ constructor.
+ (callConstructor): Removed.
+
2004-12-06 Dalibor Topic <topic at notebox>
* libraries/javalib/gnu/classpath/Configuration.java
Index: kaffe/libraries/clib/io/java_io_ObjectInputStream.c
diff -u kaffe/libraries/clib/io/java_io_ObjectInputStream.c:1.1 kaffe/libraries/clib/io/java_io_ObjectInputStream.c:1.2
--- kaffe/libraries/clib/io/java_io_ObjectInputStream.c:1.1 Fri Dec 3 21:54:04 2004
+++ kaffe/libraries/clib/io/java_io_ObjectInputStream.c Mon Dec 6 17:39:41 2004
@@ -78,28 +78,14 @@
Java_java_io_ObjectInputStream_allocateObject( JNIEnv * env,
jobject self
__attribute__ ((__unused__)),
- jclass clazz )
+ jclass clazz,
+ jclass constr_clazz,
+ jobject constructor)
{
- return (*env)->AllocObject( env, clazz );
-}
+ jobject obj = (*env)->AllocObject( env, clazz );
+ jmethodID id = (*env)->FromReflectedMethod( env, constructor);
+ (*env)->CallNonvirtualVoidMethod( env, obj, constr_clazz, id);
-/*
- * Class: java_io_ObjectInputStream
- * Method: callConstructor
- * Signature: (Ljava/lang/Class;Ljava/lang/Object;)V
- */
-JNIEXPORT void JNICALL
-Java_java_io_ObjectInputStream_callConstructor( JNIEnv * env,
- jclass clazz
- __attribute__ ((__unused__)),
- jclass constr_class,
- jobject obj )
-{
- jmethodID id = (*env)->GetMethodID( env, constr_class,
- "<init>", "()V" );
- if( id == NULL )
- return;
-
- (*env)->CallNonvirtualVoidMethod( env, obj, constr_class, id);
+ return obj;
}
Index: kaffe/libraries/javalib/Klasses.jar.bootstrap
cvs rdiff: failed to read diff file header /tmp/cvsSgrsws for Klasses.jar.bootstrap,v: end of file
system command returned non-zero exit status: 1: aborting
More information about the kaffe
mailing list