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) {
137
137
String thisVersion = getParsedVersion ();
138
138
String otherVersion = ((ContributedLibrary ) obj ).getParsedVersion ();
139
139
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
141
144
// 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 ;
144
147
145
148
String thisName = getName ();
146
149
String otherName = ((ContributedLibrary ) obj ).getName ();
You can’t perform that action at this time.
0 commit comments