* PATCH: fix gnu/testlet/java/lang/Class/security for very lazy VMs
@ 2006-03-11 20:27 Edwin Steiner
0 siblings, 0 replies; only message in thread
From: Edwin Steiner @ 2006-03-11 20:27 UTC (permalink / raw)
To: Mauve Patch List
Hello!
The following patch fixes the gnu/testlet/java/lang/Class/security
testlet for very lazy VMs like cacao. The problem was that these lines:
// Make sure everything's fully resolved, or we'll be loading
// classes during tests and the extra checks will make us fail.
testClass.getDeclaredClasses();
testClass.getDeclaredMethods();
do not resolve enough because they only request non-inherited
methods. When running this test, cacao causes a problem when
resolving the parameters of the inherited method
gnu.testlet.Testlet.test(Lgnu/testlet/TestHarness;)V
cacao loads gnu/testlet/TestHarness only then. (Note that
"testClass" in this testlet has a different class loader
(on purpose, it seems), so this class has to be loaded from
the classfile. Adding getClasses and getMethods solves
this issue.
-Edwin
2006-03-11 Edwin Steiner <edwin.steiner@gmx.net>
* gnu/testlet/java/lang/Class/security.java (test):
Call getClasses() and getMethods() during preparation, so no
classes have to be loaded (causing extra checks).
Index: gnu/testlet/java/lang/Class/security.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Class/security.java,v
retrieving revision 1.3
diff -u -p -r1.3 security.java
--- gnu/testlet/java/lang/Class/security.java 3 Feb 2006 10:21:46 -0000 1.3
+++ gnu/testlet/java/lang/Class/security.java 11 Mar 2006 20:22:53 -0000
@@ -49,6 +49,8 @@ public class security implements Testlet
// classes during tests and the extra checks will make us fail.
testClass.getDeclaredClasses();
testClass.getDeclaredMethods();
+ testClass.getClasses();
+ testClass.getMethods();
// we need to restrict access to some packages for some of the
// checks to occur.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-03-11 20:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-11 20:27 PATCH: fix gnu/testlet/java/lang/Class/security for very lazy VMs Edwin Steiner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).