diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2014-04-02 00:32:16 +0200 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2014-04-02 00:32:16 +0200 |
| commit | b674157bf100ee5d1616b104f49a26631c9ba1f6 (patch) | |
| tree | 7c7facd8c829276d925bd2df0b709ded7a3556cf | |
| parent | 6422ccae65dbf47d53f18c3501e4a295dcdaf751 (diff) | |
| parent | a045c6edaebe4200835aeffcea977fc8245b6ad1 (diff) | |
| download | cgeo-b674157bf100ee5d1616b104f49a26631c9ba1f6.zip cgeo-b674157bf100ee5d1616b104f49a26631c9ba1f6.tar.gz cgeo-b674157bf100ee5d1616b104f49a26631c9ba1f6.tar.bz2 | |
Merge branch 'release' into upstream
| -rw-r--r-- | main/res/values/changelog_release.xml | 11 | ||||
| -rw-r--r-- | main/src/cgeo/geocaching/Geocache.java | 11 |
2 files changed, 11 insertions, 11 deletions
diff --git a/main/res/values/changelog_release.xml b/main/res/values/changelog_release.xml index a8edc4d..53d1766 100644 --- a/main/res/values/changelog_release.xml +++ b/main/res/values/changelog_release.xml @@ -2,11 +2,16 @@ <resources> <!-- changelog for the release branch --> <string name="changelog_release" translatable="false">\n - <b>2014.03.31:</b>\n + <b>2014.04.01:</b>\n <b>Bugfixing:</b>\n - · Make it again compatible with Android before 2.3.\n - · Fix a bug with downloading of preview maps.\n + · Remove support of Android versions older than 2.3\n + (Split to a legacy version available for v2.1 and v2.2)\n + · Fixed some possible crash scenarios\n \n + <b>2014.03.31:</b>\n + <b>Bugfixing:</b>\n + · Make it again compatible with Android before 2.3\n + · Fix a bug with downloading of preview maps\n \n <b>2014.03.30:</b>\n <b>New features:</b>\n diff --git a/main/src/cgeo/geocaching/Geocache.java b/main/src/cgeo/geocaching/Geocache.java index a03f515..a224e4e 100644 --- a/main/src/cgeo/geocaching/Geocache.java +++ b/main/src/cgeo/geocaching/Geocache.java @@ -1414,19 +1414,14 @@ public class Geocache implements ICache, IWaypoint { @Override public int hashCode() { - return geocode.hashCode() * name.hashCode(); + return StringUtils.defaultString(geocode).hashCode(); } @Override public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (!(obj instanceof Geocache)) { - return false; - } + // TODO: explain the following line or remove this non-standard equality method // just compare the geocode even if that is not what "equals" normally does - return StringUtils.isNotBlank(geocode) && geocode.equals(((Geocache) obj).geocode); + return this == obj || (obj instanceof Geocache && StringUtils.isNotEmpty(geocode) && geocode.equals(((Geocache) obj).geocode)); } public void store(CancellableHandler handler) { |
