Bug 313514 - Dead code by constant
Summary: Dead code by constant
Status: RESOLVED DUPLICATE of bug 256463
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: 3.5 M4   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard: To be verified for 4.6 M5
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-19 08:37 EDT by Marvin Fröhlich CLA
Modified: 2016-01-14 14:17 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marvin Fröhlich CLA 2010-05-19 08:37:45 EDT
Build Identifier: 20090920-1017

I have code like this.

##############
class C
{
    private static final boolean B = true;
    
    public void test()
    {
        if ( B )
        {
            System.out.println( "yes" );
        }
        else
        {
            System.out.println( "no" );
        }
    }
}
##############

The else block together with its braces is marked as dead code and warnings are produced.

I would like to mark the static boolean variable, so that all dead code, that depends on it, is not warned about, since it is not "really" dead code.

Reproducible: Always
Comment 1 Stephan Herrmann CLA 2016-01-14 14:17:29 EST
No longer relevant since bug 256463.

I only see one problem: that change was released for 3.5M4, whereas this report claims the issue existed in 3.5. Hm? Marking as duplicate anyway.

*** This bug has been marked as a duplicate of bug 256463 ***