Community
Participate
Working Groups
Build Identifier: On some of my plugin-projects i get an unexpected compiler error : "Cannot switch on a value of type String." when it try to swich on a String. I am using Java 1.7 and eclipse 3.71 so it should work. In the MANIFEST.MF of my plugin project i have set the execution enviroment to JavaSE-1.7. There are no project specific compile properties set, i use my workspace preferences. The workspace compiler compliance is set to 1.7 too. see -> https://picasaweb.google.com/lh/photo/UsNk4Rp0hetRiHnpd2vrzrTj1UYXjjPWBBLrFWoUKgk?feat=directlink I use "Eclipse for RCP and RAP Developers" which was updated from 3.7.0 to 3.7.1 Version: Indigo Service Release 1 Build id: 20110916-0149 Reproducible: Couldn't Reproduce
Created attachment 206253 [details] screenshot with my project preferences
I found a workaround, just klick on "Update the classpath setting" on the Overview-Tab in the MANIFEST-Editor. In Folder-".settings" i have now a new "org.eclipse.jdt.core.prefs"-File, it contains: eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 org.eclipse.jdt.core.compiler.compliance=1.7 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.source=1.7 My ".classpath"-File was changed, instead of: <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> it contains now: <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
(In reply to comment #2) > eclipse.preferences.version=1 > org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled > org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 > org.eclipse.jdt.core.compiler.compliance=1.7 > org.eclipse.jdt.core.compiler.problem.assertIdentifier=error > org.eclipse.jdt.core.compiler.problem.enumIdentifier=error > org.eclipse.jdt.core.compiler.source=1.7 This is equivalent to specifying project settings. Does it work if you remove this folder? Are you also having 1.6 based plugin projects in the same workspace? Is there anything that you can provide for us to reproduce the behavior?
> Version: Indigo Service Release 1 > Build id: 20110916-0149 This isn't really sufficient. Can you please provide the jdt.core bundle version? (Help>About>Installation Details>Plugins>Look up org.eclipse.jdt.core)
(In reply to comment #4) > ...Can you please provide the jdt.core bundle > version? 3.7.1.v_B76_R37x
(In reply to comment #3) > Does it work if you remove this folder? Yes! After removing the folder the project can be compiled without errors! It even compiles without errors if i revert the ".classpath" - File. > Are you also having 1.6 based plugin projects in the same workspace? Yes, i have many 1.6 and 1.7 plugin projects ! > Is there anything that you can provide for us to reproduce the behavior? I don't find a way to reproduce it. I only know that it happen to some 1.7 projects with a string-switch not all. After appling the described workaround every everthing is fine.
There is nothing to do here. If you manage to reproduce it please feel free to reopen with clear instructions.
Verified for 3.8M5 using I20120122-2000