It isn't the JVM that causes the problem with double-checked initalizers, it
is the spec (and it is also multi-processors systems).

However the problem with double-checked initializers isn't really the issue
that you are bringing up here.  What you are asking for is code inspection
that is "thread aware."  This would require code inspection to understand
the impact that multiple threads have on your code.  This, too, has been
discussed on the list recently.  If you start to take threading into account
with code inspection you quickly run in to an impossible problem.  Think
about the impact of threading on code.  Idea has no way of knowing if your
code is going to be running in multiple threads or not.  That means it can't
really do any analysis on any non-local variables because the values could
always be changing behind your back.  That wouldn't be very useful code
inspection.  So instead, Idea assumes you're running in a single-threaded
environment.  Maybe, with some though, we could figure out what part of code
inspection isn't' very useful in a multi-threaded environment and IntelliJ
could provide options to turn quickly turn them all off.

-Tom
--
[EMAIL PROTECTED]
"But we don't talk about it 
        we just become shadows of ourselves"
                -Duncan Sheik, In the Absence of Sun

>-----Original Message-----
>From: Cedric ROUVRAIS [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, March 28, 2002 4:23 PM
>To: [EMAIL PROTECTED]
>Subject: RE: [Eap-list] 614: Code Inspection, constant 
>conditions & NPEs
>
>
>Hi Max,
>
>Guess i missed the discussion, however just because the 
>implementation is
>faulty it doesn't mean that it will always be faulty, some day it will
>corrected.
>Having an ide that is compliant to the spec is better than 
>having a ide that
>is compliant to the defects of the jvm, imo.
>
>a++ Cedric
>
>-----Original Message-----
>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED]]On
>Behalf Of Maxim 
>Shafirov
>Sent: jeudi 28 mars 2002 17:59
>To: Cedric ROUVRAIS
>Subject: Re: [Eap-list] 614: Code Inspection, constant 
>conditions & NPEs
>
>
>Hello Cedric,
>
>This topic had already been discussed in eap several days ago. As the
>matter of fact double synchronization does not makes what it intended
>to in the current implementation of JVM.
>
>--
>Best regards,
>Maxim Shafirov
>JetBrains, Inc / IntelliJ Software
>http://www.intellij.com
>"Develop with pleasure!"
>
>
>
>_______________________________________________
>Eap-list mailing list
>[EMAIL PROTECTED]
>http://www.intellij.com/mailman/listinfo/eap-list
>

_______________________________________________
Eap-list mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-list

Reply via email to