[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Private Constructors??????



>> 	"pj_Thread.java" has two cases of (private) inner classes with
>> private constructors.  When I recompiled with jikes on Linux (RH6.2),
>> the resulting .class refused to initialize.
>
>This seems to be a defined "runtime incompatibility":
>	http://developer.java.sun.com/developer/bugParade/bugs/4142972.html
>
>Basically, older java compilers do not generate the appropriate magic
>accessor methods for letting outer classes access private
>methods/constructors of inner classes.  I've made the required
>constructors package-access since that seems more appropriate than
>relying on a compiler to generate a magic method.

	I agree.  I don't see why (other than for compatibility with
previous, broken compilers) Java2 allows outer classes to access pthe
private constructors of inner classes, unless it's because of general
klutziness in the protection system itself.  Perhaps there should be
an access type for outer classes (sort of: public, package, enclosing).

>> 	Why didn't I get this same error with the class library supplied
>> with ANTS-2.0.0?  Perhaps it's a different version of jnodeos than
>> the one jnodeos distribution on the Web site, which is:
>
>Must have been the compiler used to generate the .class files?  We
>used jikes v1.06, I think.

	I used jikes version 1.13 3/1/2001.

					Craig Milo Rogers





[ Janos ] [ OSKit ] [ Network Testbed ] [ Flick ] [ Fluke ]
Flux Research Group / Department of Computer Science / University of Utah