Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2012-01-12 09:46:34 -0500
committerThomas Watson2012-01-12 09:46:34 -0500
commit1c32ce7a576a33732ac92fac2d4cbe8ee6cc57d2 (patch)
treeac0381baba510233e0a07f64d7878ab1e9e0811c
parent1d44655e23034efd02c0d9a80202742d9b7b0dbc (diff)
downloadrt.equinox.framework-1c32ce7a576a33732ac92fac2d4cbe8ee6cc57d2.tar.gz
rt.equinox.framework-1c32ce7a576a33732ac92fac2d4cbe8ee6cc57d2.tar.xz
rt.equinox.framework-1c32ce7a576a33732ac92fac2d4cbe8ee6cc57d2.zip
Bug 368436 - EclipseStarter.searchFor(..) appends '/' sign at the end of JAR's path for initial bundlesv20120112-1446
-rw-r--r--bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java b/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java
index f250acfd0..0a5692db9 100644
--- a/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java
+++ b/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2011 IBM Corporation and others.
+ * Copyright (c) 2003, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -1297,6 +1297,7 @@ public class EclipseStarter {
return null;
String result = null;
Object[] maxVersion = null;
+ boolean resultIsFile = false;
for (int i = 0; i < candidates.length; i++) {
String candidateName = candidates[i];
if (!candidateName.startsWith(target))
@@ -1316,16 +1317,18 @@ public class EclipseStarter {
Object[] currentVersion = getVersionElements(version);
if (currentVersion != null && compareVersion(maxVersion, currentVersion) < 0) {
File candidate = new File(start, candidateName);
+ boolean candidateIsFile = candidate.isFile();
// if simple jar; make sure it is really a file before accepting it
- if (!simpleJar || candidate.isFile()) {
+ if (!simpleJar || candidateIsFile) {
result = candidate.getAbsolutePath();
+ resultIsFile = candidateIsFile;
maxVersion = currentVersion;
}
}
}
if (result == null)
return null;
- return result.replace(File.separatorChar, '/') + "/"; //$NON-NLS-1$
+ return result.replace(File.separatorChar, '/') + (resultIsFile ? "" : "/"); //$NON-NLS-1$ //$NON-NLS-2$
}
/**

Back to the top