Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 270535 - New p2.repository bundle uses 1.5 methods
Summary: New p2.repository bundle uses 1.5 methods
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Henrik Lindberg CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 270662 270759 270794 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-03-30 18:36 EDT by Andrew Niefer CLA
Modified: 2009-04-02 16:10 EDT (History)
7 users (show)

See Also:


Attachments
Fix that does not make use of Closeable and Flushable (1.30 KB, patch)
2009-03-31 12:36 EDT, Henrik Lindberg CLA
no flags Details | Diff
Fix for all the reported 1.5 classes/methods (4.38 KB, patch)
2009-03-31 14:44 EDT, Henrik Lindberg CLA
john.arthorne: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Niefer CLA 2009-03-30 18:36:40 EDT
FileReader.hardClose uses Closeable and Flushable interfaces, both are 1.5

ProgressStatistics has references to
Long.valueOf(long)
Double.valueOf(double)
String.format

all of which are 1.5


I have temporarily changed the manifest to specify a Bundle-RequiredExecutionEnvironment=1.5 to avoid compilation errors in the integration build.
Comment 1 Chris Aniszczyk CLA 2009-03-30 18:37:28 EDT
API tools should catch these problems.
Comment 2 Henrik Lindberg CLA 2009-03-31 12:36:24 EDT
Created attachment 130420 [details]
Fix that does not make use of Closeable and Flushable

This fix checks if the stream is an Input or Output stream and just calls close. The standard buffered streams will flush on a close. Callers who need more control over stream should not ask FileReader to close the stream for them anyway.

The dependency to 1.5 should be fixed by this.
Comment 3 Henrik Lindberg CLA 2009-03-31 12:38:38 EDT
Duh, I missed half of the problem... And also forgot to ask - should the impl be changed to not use any 1.5 API?
Comment 4 Ian Bull CLA 2009-03-31 12:44:45 EDT
Should we be letting people know about this for the IBuild?  (that is, are there people who run on a 1.4 VM that will hit strange errors this week)?
Comment 5 Pascal Rapicault CLA 2009-03-31 13:55:12 EDT
We should not use 1.5 API anywhere. We need to change the EE in the manifest to 1.4 and fix all references outside of this set.
As for warning the community, I don't think we need to say anything and worry anyone as the 1.5 EE will prevent the plug-ins to resolve and p2 will be disabled.
Comment 6 Henrik Lindberg CLA 2009-03-31 14:44:34 EDT
Created attachment 130441 [details]
Fix for all the reported 1.5 classes/methods

New patch that fixes all the reported classes/methods. It now uses NumberFormat.
Comment 7 Pascal Rapicault CLA 2009-03-31 15:38:38 EDT
*** Bug 270662 has been marked as a duplicate of this bug. ***
Comment 8 DJ Houghton CLA 2009-04-01 09:24:39 EDT
*** Bug 270759 has been marked as a duplicate of this bug. ***
Comment 9 Dani Megert CLA 2009-04-01 09:27:08 EDT
>  (that is, are
>there people who run on a 1.4 VM that will hit strange errors this week)?
They can neither launch Eclipse nor run test using a 1.4 VM.
Comment 10 DJ Houghton CLA 2009-04-01 10:40:05 EDT
Released patch into HEAD.
Comment 11 Thomas Watson CLA 2009-04-02 09:33:33 EDT
*** Bug 270794 has been marked as a duplicate of this bug. ***