Hi,

On Mon, 2006-02-13 at 22:45 +0100, Olivier Jolly wrote:
> >>  Those patches will make pass 2 dedicated tests in mauve in
> >>java/io/InputOutputStream directory.
> >
> >Great. And no regressions I assume.
> >
> yes, finally, after hours of struggle with mauve's batch_run and jikes,
> I could saw no regression from my own eyes.
> I will update the mauve testlet HierarchyTest to make all
> compiler-runtime-... combo happy, as discussed on irc.

For the benefit of others, since this was an obscure fact (at least for
me). The issue was that the test used inner classes for serialization
and inner classes are a pain when used together with serialization. One
of the reasons was discovered by Olivier. The JLS and JVM specs are
slightly out of sync with respect to inner classes. According to the JLS
inner classes can have a private modifier, although there is no such
thing for classes according to the JVM (such classes are actually
package private in the class file format). The JLS says that an implicit
constructor takes its permissions from its declaring class. Now some
compilers (jikes) strictly follow this and declare such an implicit
inner class constructor private. And since serialization doesn't work
for classes with a private no-arg constructor serialization will fail
for such classes when compiled with compilers that follow the JLS
strictly.

The solution to this kind of problem is to declare an explicit no-arg
constructor if you mark an inner class private so there is no ambiguity
for the compiler what access flag to put in it.

Thanks to Olivier and Tom for figuring all this out.

Cheers,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to