File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
arduino-core/src/cc/arduino/contributions/libraries Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -137,10 +137,13 @@ public boolean equals(Object obj) {
137137 String thisVersion = getParsedVersion ();
138138 String otherVersion = ((ContributedLibrary ) obj ).getParsedVersion ();
139139
140- // Important: for legacy libs, versions are null. Two legacy libs must
140+ boolean versionEquals = (thisVersion != null && otherVersion != null
141+ && thisVersion .equals (otherVersion ));
142+
143+ // Important: for legacy libs, versions are null. Two legacy libs must
141144 // always pass this test.
142- boolean versionEquals = thisVersion == otherVersion ||
143- ( thisVersion != null && otherVersion != null && thisVersion . equals ( otherVersion )) ;
145+ if ( thisVersion == null && otherVersion == null )
146+ versionEquals = true ;
144147
145148 String thisName = getName ();
146149 String otherName = ((ContributedLibrary ) obj ).getName ();
You can’t perform that action at this time.
0 commit comments