Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 264674 - [Version] String representation of version format is incorrect
Summary: [Version] String representation of version format is incorrect
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.5 M6   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-12 08:10 EST by Thomas Hallgren CLA
Modified: 2009-02-12 12:59 EST (History)
2 users (show)

See Also:


Attachments
Patch that adds a test that provokes the problem (3.99 KB, patch)
2009-02-12 08:21 EST, Thomas Hallgren CLA
john.arthorne: iplog+
Details | Diff
Patch that fixes the VersionFormat.toString() (1.12 KB, patch)
2009-02-12 08:23 EST, 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-02-12 08:10:18 EST
The value returned by toString() is incorrect for some version formats. For example:

  VersionFormat.compile("n[.n=0;[.n=0;[.S=[A-Za-z0-9_-];]]]").toString()

will produce the string:

  "format(n[.n=0;[.n=0;[.S=[A-Za-z0-9_-]]]])"

(note the missing semicolon after the character range).
Comment 1 Thomas Hallgren CLA 2009-02-12 08:21:23 EST
Created attachment 125517 [details]
Patch that adds a test that provokes the problem

This patch adds a couple of tests to the CommonPatternsTest class (present in the OmniVersion test suite) that will provoke the bug.
Comment 2 Thomas Hallgren CLA 2009-02-12 08:23:51 EST
Created attachment 125518 [details]
Patch that fixes the VersionFormat.toString()

This patch corrects the problems with VersionFormat.toString()
Comment 3 Thomas Hallgren CLA 2009-02-12 08:25:51 EST
Assigning this back to equinox.p2-inbox so that someone can commit the changes.
Comment 4 John Arthorne CLA 2009-02-12 11:00:49 EST
I assume the creation of file 1231867627946.profile in the patch from comment #1 was unintentional?
Comment 5 Thomas Hallgren CLA 2009-02-12 12:08:55 EST
Oops. Yes, that was unintentional.
Comment 6 John Arthorne CLA 2009-02-12 12:54:01 EST
I'll take this to review/release.
Comment 7 John Arthorne CLA 2009-02-12 12:59:44 EST
Thanks Thomas, released to HEAD.