Merge pull request #3415 from martinjos/legacy-lib-link-bug-3412

Handle duplicates of legacy libs correctly. (#3412)
This commit is contained in:
Federico Fissore 2015-06-25 09:29:31 +02:00
commit ca6724ad96
1 changed files with 4 additions and 1 deletions

View File

@ -137,7 +137,10 @@ public abstract class ContributedLibrary extends DownloadableContribution {
String thisVersion = getParsedVersion();
String otherVersion = ((ContributedLibrary) obj).getParsedVersion();
boolean versionEquals = thisVersion != null && otherVersion != null && thisVersion.equals(otherVersion);
// Important: for legacy libs, versions are null. Two legacy libs must
// always pass this test.
boolean versionEquals = thisVersion == otherVersion ||
(thisVersion != null && otherVersion != null && thisVersion.equals(otherVersion));
String thisName = getName();
String otherName = ((ContributedLibrary) obj).getName();