Christian,
the problem most probably concerns wrong problem report. The problem is
actually is that class A has no references (no instances have ever been
created, no static fields or static methods has been called etc.) so class A
would not be loaded and static initializer has no chance to be called.

Problem report for this case is fixed in build #613. Thank you!

----- Original Message -----
From: "Schmolzi, Christian" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 20, 2002 4:53 PM
Subject: [Eap-list] #612 code inspection: unreachable code problem


> Hi,
>
> I have come upon a question about the code inspection:
>
> My source file looks something like this:
>
> public class A {
> private static final String CVS_REVISION = "$Revision$";
>
> static {
> if (System.getProperty("debug.version") != null) {
> System.out.println("<V> A: " + CVS_REVISION);
> }
> }
>
> [other stuff]
> }
>
> I use this to give myself the possiblity to see every revision
> number of my classes just by running my program with -Ddebug.version.
>
> When I start code analysis, IDEA complains about "unreachable code",
> stating CVS_REVISION has one use, but it is not reachable from entry
points.
>
> This is true, because CVS_REVISION is not used any more but it is
> definately not unreachable. Is this the wanted behavior?
>
> Christian
>
>
> --
> Christian Schmolzi
> T-Systems GEI GmbH
> Goebelstr. 1-3, D-64293 Darmstadt
> Email: [EMAIL PROTECTED]
> Tel:   (+49) 6151 820-4670
> Fax:   (+49) 6151 820-4440
>
>
> _______________________________________________
> 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