Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 273674 - Get rid of duplicated VersionedName class
Summary: Get rid of duplicated VersionedName class
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.5 M7   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 268138 268194
  Show dependency tree
 
Reported: 2009-04-25 06:14 EDT by Thomas Hallgren CLA
Modified: 2009-04-29 15:55 EDT (History)
1 user (show)

See Also:


Attachments
Patch that removes the duplicated VersionName class (25.39 KB, patch)
2009-04-25 19:07 EDT, Thomas Hallgren CLA
no flags Details | Diff
Replacement for the now stale previous patch (25.79 KB, patch)
2009-04-28 08:59 EDT, Thomas Hallgren CLA
john.arthorne: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Hallgren CLA 2009-04-25 06:14:25 EDT
We currently have two VersionedName classes:

 org.eclipse.equinox.internal.p2.installer.VersionedName
 org.eclipse.equinox.internal.p2.publisher.VersionedName

I think we need only one and that it should be available as:

 org.eclipse.equinox.internal.provisional.p2.core.VersionedName

where it could live adjacent to Version, VersionRange, etc.
Comment 1 Thomas Hallgren CLA 2009-04-25 19:07:06 EDT
Created attachment 133234 [details]
Patch that removes the duplicated VersionName class

This patch contains three things:

1. The code changes needed to move the VersionedName from the publisher package to the core package.

2. A StringHelper class in the core package. Needed since the getArrayFromString() method was no longer accessible.

3. Tests that verifies that the StringHelper.getArrayFromString() returns the same thing as its predecessor and that it executes about 3 times faster.

A future patch should remove all implementations of getArrayFromString() and use the StringHelper variant instead. There are currently 5 duplicates of this method (6 counting the one in StringHelper) but changing that touches a lot of files. Post M7 maybe?
Comment 2 Thomas Hallgren CLA 2009-04-25 19:08:48 EDT
Marking as 3.5M7 since it would be nice to be able to use this when fixing the multiple IU's issue in the director.
Comment 3 Thomas Hallgren CLA 2009-04-28 08:59:56 EDT
Created attachment 133546 [details]
Replacement for the now stale previous patch

This patch also fixes the problem with VersionedName.toString() mentioned in bug 268138, comment 32.
Comment 4 John Arthorne CLA 2009-04-29 15:52:05 EDT
I'll release.
Comment 5 John Arthorne CLA 2009-04-29 15:55:35 EDT
The new VersionedName class was already released, but I released the remainder of the patch.