Skip to content

Commit 2048ae2

Browse files
committed
Small makeup for ContributedLibrary.equals()
1 parent 3d0a153 commit 2048ae2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arduino-core/src/cc/arduino/contributions/libraries/ContributedLibrary.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ public boolean equals(Object obj) {
133133
if (!(obj instanceof ContributedLibrary)) {
134134
return false;
135135
}
136-
136+
ContributedLibrary other = (ContributedLibrary) obj;
137137
String thisVersion = getParsedVersion();
138-
String otherVersion = ((ContributedLibrary) obj).getParsedVersion();
138+
String otherVersion = other.getParsedVersion();
139139

140140
boolean versionEquals = (thisVersion != null && otherVersion != null
141141
&& thisVersion.equals(otherVersion));
@@ -146,7 +146,7 @@ public boolean equals(Object obj) {
146146
versionEquals = true;
147147

148148
String thisName = getName();
149-
String otherName = ((ContributedLibrary) obj).getName();
149+
String otherName = other.getName();
150150

151151
boolean nameEquals = thisName == null || otherName == null || thisName.equals(otherName);
152152

0 commit comments

Comments
 (0)