From 2048ae264bd19d913f06e546f5d313f1c3706c07 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Wed, 25 Jan 2017 15:31:16 +0100 Subject: [PATCH] Small makeup for ContributedLibrary.equals() --- .../arduino/contributions/libraries/ContributedLibrary.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibrary.java b/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibrary.java index d44c5ac06..cb0d34c91 100644 --- a/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibrary.java +++ b/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibrary.java @@ -133,9 +133,9 @@ public abstract class ContributedLibrary extends DownloadableContribution { if (!(obj instanceof ContributedLibrary)) { return false; } - + ContributedLibrary other = (ContributedLibrary) obj; String thisVersion = getParsedVersion(); - String otherVersion = ((ContributedLibrary) obj).getParsedVersion(); + String otherVersion = other.getParsedVersion(); boolean versionEquals = (thisVersion != null && otherVersion != null && thisVersion.equals(otherVersion)); @@ -146,7 +146,7 @@ public abstract class ContributedLibrary extends DownloadableContribution { versionEquals = true; String thisName = getName(); - String otherName = ((ContributedLibrary) obj).getName(); + String otherName = other.getName(); boolean nameEquals = thisName == null || otherName == null || thisName.equals(otherName);