Community
Participate
Working Groups
That bundle is supposed to be Foundation 1.0 compliant according to the 3.4 plan. Maybe this has changed for 3.5. The EEs defined for this project are: Bundle-RequiredExecutionEnvironment: J2SE-1.4, CDC-1.0/Foundation-1.0, J2SE-1.3 And for the compilation, pde.build is forcing an J2SE-1.4 environment to be used: jre.compilation.profile = J2SE-1.4 The bundle execution environment should be changed to 1.4 or some methods calls should be removed. Here are the problems reported by the new validation tool from api tooling: The method java.lang.String.matches(String) referenced in org.eclipse.core.runtime.content.XMLContentDescriber is not defined in bundle's required execution environment: J2SE-1.3 The method java.lang.StringBuffer.indexOf(String) referenced in org.eclipse.core.runtime.content.XMLContentDescriber is not defined in bundle's required execution environment: J2SE-1.3 The method java.lang.String.matches(String) referenced in org.eclipse.core.runtime.content.XMLContentDescriber is not defined in bundle's required execution environment: J2SE-1.3 Since 1.3 doesn't match, Foundation 1.0 is not even considered. java.lang.String.matches(String) and java.lang.StringBuffer.indexOf(String) are methods available only in 1.4 and above.
So if this bundle is compiled using a pure J2SE-1.3 environment, it would not compile.
I suggest just switching to Foundation 1.1 / J2SE 1.4 here.
org.eclipse.core.contenttype depends on org.eclipse.equinox.common which has the minimal execution environment set to Foundation 1.1 / J2SE-1.4. So clients can't use org.eclipse.core.contenttype on Foundation 1.0 anyway. John's suggestion looks good.
Fixed.
Using Foundation1.1 is good enough for the java.lang.StringBuffer#indexOf(String), but it doesn't fix the String.matches(..) calls. This is still invalid for a foundation 1.1 profile. I got these errors from last night build: The method java.lang.String.matches(String) referenced in org.eclipse.core.runtime.content.XMLContentDescriber.internalDescribe(String, IContentDescription) is not defined in bundle's required execution environment: CDC-1.1/Foundation-1.1 The method java.lang.String.matches(String) referenced in org.eclipse.core.runtime.content.XMLContentDescriber.isCharsetValid(String) is not defined in bundle's required execution environment: CDC-1.1/Foundation-1.1
Olivier, could you tell me how should I configure my Eclipse to see such errors? I use j2se-1.4 machine and the compliance level for the project is set to 1.4. What else should I do?
You should set the check for invalid references in the library to warnings or errors in your project settings. Plug-in Development>API Errors/Warnings>General>Invalid references in system libraries. By default this is set to ignore.
Created attachment 119168 [details] Fix v01
Thanks Olivier. Released to HEAD.