### Eclipse Workspace Patch 1.0 #P org.eclipse.update.configurator Index: build.properties =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.update.configurator/build.properties,v retrieving revision 1.6 diff -u -r1.6 build.properties --- build.properties 4 Apr 2005 03:11:02 -0000 1.6 +++ build.properties 5 May 2006 14:59:04 -0000 @@ -18,3 +18,4 @@ META-INF/ src.includes = about.html source.. = src/ +qualifier=v20060428 \ No newline at end of file Index: src/org/eclipse/update/internal/configurator/VersionedIdentifier.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/VersionedIdentifier.java,v retrieving revision 1.9 diff -u -r1.9 VersionedIdentifier.java --- src/org/eclipse/update/internal/configurator/VersionedIdentifier.java 11 Apr 2006 15:47:56 -0000 1.9 +++ src/org/eclipse/update/internal/configurator/VersionedIdentifier.java 5 May 2006 14:59:04 -0000 @@ -13,6 +13,8 @@ import java.util.ArrayList; import java.util.StringTokenizer; +import org.osgi.framework.Version; + public class VersionedIdentifier { private String identifier = ""; //$NON-NLS-1$ private int major = 0; @@ -34,7 +36,7 @@ if (s == null || (s = s.trim()).equals("")) //$NON-NLS-1$ return; - int loc = s.lastIndexOf(ID_SEPARATOR); + int loc = testUnderScores(s); if (loc != -1) { this.identifier = s.substring(0, loc); version = s.substring(loc + 1); @@ -45,6 +47,21 @@ this.identifier = s; } + private int testUnderScores(String fileName) { + int underScore = fileName.indexOf('_'); + while (underScore >= 0) { + try { + Version.parseVersion(fileName.substring(underScore + 1)); + } catch (IllegalArgumentException iae) { + // continue to next underscore + underScore = fileName.indexOf('_', underScore + 1); + continue; + } + break; + } + return underScore; + } + public VersionedIdentifier(String id, String version) { this(id+ID_SEPARATOR+ (version==null?"0.0.0":version) ); //$NON-NLS-1$ this.version = version;