Community
Participate
Working Groups
3.1M7 My workspace is configured to use JDK 1.5.0_02 and the compiler compilance level is set to 5.0. I've checked out org.eclipse.pde.build from HEAD into this workspace. This project uses a project specific setting for 1.4 compatibility. I get the following compile errors for org.eclipse.pde.build/src/org/eclipse/pde/internal/build/FeatureWriter.java Severity Description Resource In Folder Location Creation Time 2 The return type is incompatible with Writer.append(char), PrintWriter.append(char) FeatureWriter.java org.eclipse.pde.build/src/org/eclipse/pde/internal/build line 24 24. Mai 2005 07:16:07 2 The return type is incompatible with Writer.append(CharSequence, int, int), PrintWriter.append(CharSequence, int, int) FeatureWriter.java org.eclipse.pde.build/src/org/eclipse/pde/internal/build line 24 24. Mai 2005 07:16:07 2 The return type is incompatible with Writer.append(CharSequence), PrintWriter.append(CharSequence) FeatureWriter.java org.eclipse.pde.build/src/org/eclipse/pde/internal/build line 24 24. Mai 2005 07:16:07 FeatureWriter extends XMLWriter which extends PrintWriter. The methods in question arn't overwritten in FeatureWriter. Any ideas why these errors are generated?
Kent: if 1.4 compliance is enabled, we usually want to behave against 1.5 libs still as much as possible (but not more).
I suspect though in this case, we get abused by covariance methods in 1.5 libraries, and cannot ignore them. A simple test would be to compile same sample using javac 1.4 against 1.5 libs.
Closing. We cannot perform in 1.4 against covariant libs.