Re: JavaMemoryModel: Should we allow synchronized constructors?

From: Bill Pugh (pugh@cs.umd.edu)
Date: Fri Jan 04 2002 - 23:57:48 EST


>I also tried constructing some class files with synchronized
>constructors, and ran it with -Xfuture -Xverify:all under 1.4beta3,
>and no errors were generated.

Sorry, my bad. Didn't create the classfiles correctly.

> [savoir 37] java A
>Exception in thread "main" java.lang.ClassFormatError: A (Illegal
>method modifiers: 0x20)

Hotspot rejects classfiles that have ACC_SYNCHRONIZED set.

However, I can't find any justification for this in the JVMS, only in the JLS.

        Bill
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:37 EDT