Bug 96570

Summary: Compile Error in FeatureWriter.java
Product: [Eclipse Project] JDT Reporter: Gunnar Wagenknecht <gunnar>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 RC4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Gunnar Wagenknecht CLA 2005-05-25 04:49:46 EDT
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?
Comment 1 Philipe Mulet CLA 2005-05-25 05:11:25 EDT
Kent: if 1.4 compliance is enabled, we usually want to behave against 1.5 libs
still as much as possible (but not more).
Comment 2 Philipe Mulet CLA 2005-05-25 05:12:50 EDT
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.
Comment 3 Philipe Mulet CLA 2005-06-21 09:44:33 EDT
Closing. We cannot perform in 1.4 against covariant libs.