Ito Kazumitsu wrote:
From: Dalibor Topic <[EMAIL PROTECTED]>
Date: Tue, 13 Dec 2005 16:28:43 +0100


       * kaffe/kaffevm/access.c
       (outerof): New function,
       (checkAccess): Corrected the handling of private access.


thanks for the patch, Ito!


My pleasure.

With this patch applied (and also even without it), the mauve test
gnu.testlet.java.lang.Class.newInstance shows the following result.

gnu.testlet.java.lang.Class.newInstance
----
PASS: gnu.testlet.java.lang.Class.newInstance (number 1)
PASS: gnu.testlet.java.lang.Class.newInstance (number 2)
PASS: gnu.testlet.java.lang.Class.newInstance (number 3)
PASS: gnu.testlet.java.lang.Class.newInstance (number 4)
PASS: gnu.testlet.java.lang.Class.newInstance (number 5)
PASS: gnu.testlet.java.lang.Class.newInstance (number 6)
PASS: gnu.testlet.java.lang.Class.newInstance (number 7)
PASS: gnu.testlet.java.lang.Class.newInstance (number 8)
PASS: gnu.testlet.java.lang.Class.newInstance (number 9)
FAIL: gnu.testlet.java.lang.Class.newInstance (number 10)
PASS: gnu.testlet.java.lang.Class.newInstance (number 11)
PASS: gnu.testlet.java.lang.Class.newInstance (number 12)
PASS: gnu.testlet.java.lang.Class.newInstance (number 13)
PASS: gnu.testlet.java.lang.Class.newInstance (number 14)
PASS: gnu.testlet.java.lang.Class.newInstance (number 15)
1 of 15 tests failed

The test case #10 is the case where a privtate constructor
of an inner class is called from an outer class, that is
the problematic case from which this kaffe/kaffevm/access.c
case revealed.

Sun's JDK passes the test case #10, but as I wrote before,
this test should fail and JDK's behavour seems to be wrong.


Hi Ito,

Thank you very much for your kind explanation.

I've looked at it again, after Riccardo reported some problems after the patch was committed, and now I believe that it is OK, actually to allow access in this case, after looking at JLS3, ยง6.6.1, and a similar question from http://forum.java.sun.com/thread.jspa?messageID=3984493 : A private constructor of a nested class is explicitely accessible from "the body of the top level class enclosing it".

It would explain why I get an error message trying to shut down eclipse3, atm, regarding something that looks suspiciouly like an access error regarding a nested class' constructor. What do you think?

cheers,
dalibor topic

_______________________________________________
kaffe mailing list
[email protected]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


_______________________________________________
kaffe mailing list
[email protected]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to