We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98eb1a9 commit ba09c75Copy full SHA for ba09c75
arduino-core/src/cc/arduino/contributions/libraries/ContributedLibrary.java
@@ -142,7 +142,10 @@ public boolean equals(Object obj) {
142
String thisVersion = getParsedVersion();
143
String otherVersion = ((ContributedLibrary) obj).getParsedVersion();
144
145
- boolean versionEquals = thisVersion != null && otherVersion != null && thisVersion.equals(otherVersion);
+ // Important: for legacy libs, versions are null. Two legacy libs must
146
+ // always pass this test.
147
+ boolean versionEquals = thisVersion == otherVersion ||
148
+ (thisVersion != null && otherVersion != null && thisVersion.equals(otherVersion));
149
150
String thisName = getName();
151
String otherName = ((ContributedLibrary) obj).getName();
0 commit comments