Bug 96570 - Compile Error in FeatureWriter.java
Summary: Compile Error in FeatureWriter.java
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 RC4   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-25 04:49 EDT by Gunnar Wagenknecht CLA
Modified: 2005-06-21 09:44 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.