1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-29 10:24:12 +01:00

Handle duplicates of legacy libs correctly. (#3412)

This commit is contained in:
Martin Sidaway 2015-06-24 17:58:31 +01:00
parent 98eb1a9ee2
commit ba09c7511c

View File

@ -142,7 +142,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();