Bug 283700 - Unnecessary branch could be marked
Summary: Unnecessary branch could be marked
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-16 08:51 EDT by Benjamin Muskalla CLA
Modified: 2009-07-16 08:58 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Muskalla CLA 2009-07-16 08:51:15 EDT
I20090528-2000

Snippet:


public class A {

	public static void main(String[] args) {
		Object x = args[0];
		if(x == null) {
			f(null);
		} else {
			f(x);
		}
	}
	
	private static void f(Object x) {
		System.out.println(x);
	}
}

The compiler should mark the branch as uneccessary as both branches do the same.