[kaffe] CVS kaffe (robilad): Implemented setSigners

Kaffe CVS cvs-commits at kaffe.org
Sun Dec 5 14:47:43 PST 2004


PatchSet 5543 
Date: 2004/12/05 22:43:25
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Implemented setSigners

2004-12-05  Dalibor Topic  <robilad at kaffe.org>

        * test/regression/ProcessClassInst.java,
        test/regression/ProcessClassStop.java:
        Updated expected stack traces.

2004-12-05  Casey Marshall  <csm at gnu.org>

        * kaffe/kaffevm/classMethod.h:
        (signers) new field.

        * libraries/clib/native/Class.c:
        (java_lang_Class_getSigners0) new function. implemented.
        (java_lang_Class_getSigners) removed.
        (java_lang_Class_setSigners) implemented.

        * libraries/javalib/java/lang/Class.java:
        (getSigners) implemented.

        * libraries/javalib/java/lang/ClassLoader.java:
        (setSigners) implemented.

Members: 
	ChangeLog:1.3089->1.3090 
	kaffe/kaffevm/classMethod.h:1.69->1.70 
	libraries/clib/native/Class.c:1.74->1.75 
	libraries/javalib/java/lang/Class.java:1.49->1.50 
	libraries/javalib/java/lang/ClassLoader.java:1.33->1.34 
	test/regression/ProcessClassInst.java:1.10->1.11 
	test/regression/ProcessClassStop.java:1.9->1.10 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3089 kaffe/ChangeLog:1.3090
--- kaffe/ChangeLog:1.3089	Sun Dec  5 18:56:48 2004
+++ kaffe/ChangeLog	Sun Dec  5 22:43:25 2004
@@ -1,3 +1,25 @@
+2004-12-05  Dalibor Topic  <robilad at kaffe.org>
+
+	* test/regression/ProcessClassInst.java,
+	test/regression/ProcessClassStop.java:
+	Updated expected stack traces.
+
+2004-12-05  Casey Marshall  <csm at gnu.org>
+
+	* kaffe/kaffevm/classMethod.h:
+	(signers) new field.
+
+	* libraries/clib/native/Class.c:
+	(java_lang_Class_getSigners0) new function. implemented.
+	(java_lang_Class_getSigners) removed.
+	(java_lang_Class_setSigners) implemented.
+
+	* libraries/javalib/java/lang/Class.java:
+	(getSigners) implemented.
+
+	* libraries/javalib/java/lang/ClassLoader.java:
+	(setSigners) implemented.
+
 2004-12-05  Mark Wielaard  <mark at klomp.org>
 
 	* libraries/javalib/gnu/xml/dom/ls/ReaderInputStream.java
Index: kaffe/kaffe/kaffevm/classMethod.h
diff -u kaffe/kaffe/kaffevm/classMethod.h:1.69 kaffe/kaffe/kaffevm/classMethod.h:1.70
--- kaffe/kaffe/kaffevm/classMethod.h:1.69	Wed Dec  1 02:41:51 2004
+++ kaffe/kaffe/kaffevm/classMethod.h	Sun Dec  5 22:43:28 2004
@@ -163,6 +163,9 @@
 	/** Stab type ID. */
 	int stab_id;
 #endif
+
+	/** The array of 'signer' objects; usually Certificates. */
+	HArrayOfObject*		signers;
 };
 
 #ifndef __DEFINED_CLASS
Index: kaffe/libraries/clib/native/Class.c
diff -u kaffe/libraries/clib/native/Class.c:1.74 kaffe/libraries/clib/native/Class.c:1.75
--- kaffe/libraries/clib/native/Class.c:1.74	Mon Jul  5 16:40:53 2004
+++ kaffe/libraries/clib/native/Class.c	Sun Dec  5 22:43:29 2004
@@ -280,16 +280,16 @@
 	return (this->accflags & (ACC_MASK & ~ACC_SUPER));
 }
 
-HArrayOfObject* NONRETURNING
-java_lang_Class_getSigners(struct Hjava_lang_Class* this UNUSED)
+HArrayOfObject*
+java_lang_Class_getSigners0(struct Hjava_lang_Class* this)
 {
-	unimp("java.lang.Class:getSigners unimplemented");
+	return this->signers;
 }
 
-void NONRETURNING
-java_lang_Class_setSigners(struct Hjava_lang_Class* this UNUSED, HArrayOfObject* sigs UNUSED)
+void
+java_lang_Class_setSigners(struct Hjava_lang_Class* this, HArrayOfObject* sigs)
 {
-	unimp("java.lang.Class:setSigners unimplemented");
+	this->signers = sigs;
 }
 
 /*
Index: kaffe/libraries/javalib/java/lang/Class.java
diff -u kaffe/libraries/javalib/java/lang/Class.java:1.49 kaffe/libraries/javalib/java/lang/Class.java:1.50
--- kaffe/libraries/javalib/java/lang/Class.java:1.49	Mon Mar 22 11:24:46 2004
+++ kaffe/libraries/javalib/java/lang/Class.java	Sun Dec  5 22:43:31 2004
@@ -356,7 +356,14 @@
 	return loader.getResourceAsStream(name);
 }
 
-native public Object[] getSigners();
+public Object[] getSigners()
+{
+        Object[] signers = getSigners0();
+        return signers == null ? null : (Object[]) signers.clone();
+}
+
+private native Object[] getSigners0();
+
 native void setSigners(Object[] signers);
 
 native public Class getSuperclass();
Index: kaffe/libraries/javalib/java/lang/ClassLoader.java
diff -u kaffe/libraries/javalib/java/lang/ClassLoader.java:1.33 kaffe/libraries/javalib/java/lang/ClassLoader.java:1.34
--- kaffe/libraries/javalib/java/lang/ClassLoader.java:1.33	Sun Nov 14 17:07:22 2004
+++ kaffe/libraries/javalib/java/lang/ClassLoader.java	Sun Dec  5 22:43:31 2004
@@ -205,9 +205,8 @@
 	return parent;
 }
 
-protected final void setSigners(Class cl, Object signers[]) {
-	throw new kaffe.util.NotImplemented(getClass().getName()
-		+ ".setSigners()");
+protected final void setSigners(Class cl, Object[] signers) {
+        cl.setSigners (signers);
 }
 
 protected final Class findLoadedClass(String name) {
Index: kaffe/test/regression/ProcessClassInst.java
diff -u kaffe/test/regression/ProcessClassInst.java:1.10 kaffe/test/regression/ProcessClassInst.java:1.11
--- kaffe/test/regression/ProcessClassInst.java:1.10	Wed Aug 27 20:07:26 2003
+++ kaffe/test/regression/ProcessClassInst.java	Sun Dec  5 22:43:32 2004
@@ -104,6 +104,6 @@
 java.lang.NoClassDefFoundError: Base
    at java.lang.Class.getConstructor0 (Class.java)
    at java.lang.Class.getDeclaredConstructor (Class.java:174)
-   at java.lang.Class.newInstance (Class.java:422)
+   at java.lang.Class.newInstance (Class.java:429)
    at ProcessClassInst.main (ProcessClassInst.java:72)
 */
Index: kaffe/test/regression/ProcessClassStop.java
diff -u kaffe/test/regression/ProcessClassStop.java:1.9 kaffe/test/regression/ProcessClassStop.java:1.10
--- kaffe/test/regression/ProcessClassStop.java:1.9	Wed Aug 27 20:07:26 2003
+++ kaffe/test/regression/ProcessClassStop.java	Sun Dec  5 22:43:32 2004
@@ -107,6 +107,6 @@
 java.lang.NoClassDefFoundError: Base
    at java.lang.Class.getConstructor0 (Class.java)
    at java.lang.Class.getDeclaredConstructor (Class.java:174)
-   at java.lang.Class.newInstance (Class.java:422)
+   at java.lang.Class.newInstance (Class.java:429)
    at ProcessClassStop.main (ProcessClassStop.java:74)
 */




More information about the kaffe mailing list