Re: Puzzling class field initialization order

Ted Neward <[email protected]>
Newsgroups gmane.comp.windows.devel.java.advanced
Message-ID <0b0f01c7f289$74a91d70$5dfb5850$@net>
This is expected behavior (where "expected" means, "It's documented as such in the JVM spec...").

Ted Neward
Java, .NET, XML Services
Consulting, Teaching, Speaking, Writing
http://www.tedneward.com
 

> -----Original Message-----
> From: Discussion of advanced Java topics. [mailto:ADVANCED-
> [email protected]] On Behalf Of Carfield Yim
> Sent: Friday, September 07, 2007 8:08 AM
> To: [email protected]
> Subject: Re: [ADVANCED-JAVA] Puzzling class field initialization order
> 
> > 3. S.IMPL = C.INSTANCE would trigger C loading, but C is already
> being
> > loaded, and INSTANCE is still null, so it is assigned null
> > ...
> 
> Is it the specificed behaviour or it is just a bug of Sun JVM? As I
> application developer I wouldn't expect this at all...
> 
> ===================================
> This list is hosted by DevelopMentor  http://www.develop.com
> 
> View archives and manage your subscription(s) at
> http://discuss.develop.com
> 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.485 / Virus Database: 269.13.8/993 - Release Date:
> 9/6/2007 3:18 PM
> 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.485 / Virus Database: 269.13.10/995 - Release Date: 9/8/2007 1:24 PM
 

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.