Community
Participate
Working Groups
In the following snippet with 1.5 the compiler does not say anything about using 1.7 level, while javac does. - I think this is needed for consistency, as for other 1.7 features the error message informs the user that the feature is available in source level 1.7 or greater. - In JDT UI we can then provide a quick fix to change compiler compliance to 1.7 (see bug 348459) ------------------------------------------------------------- void foo(String s) { switch (s) { case "abc": System.out.println("abcd"); break; case "xyz": System.out.println("xyz"); break; } } -------------------------------------------------------------
See also bug 348493.
Fixed in BETA_JAVA7 branch
Verified using "Eclipse Java Development Tools Patch for Java 7 Support (BETA) 1.0.0.v20110623-0900 org.eclipse.jdt.patch.feature.group Eclipse.org"