1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-18 07:52:14 +01:00

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

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();