From 07b0b2b1e8ec7a99a3db1dfc72c9e86c4985147b Mon Sep 17 00:00:00 2001 From: Bananeweizen Date: Sun, 4 Mar 2012 19:56:33 +0100 Subject: refactoring: cleanups * remove unused resources * fix some comments, layout, logging and other stuff --- main/src/cgeo/geocaching/Settings.java | 2 -- main/src/cgeo/geocaching/gcvote/GCVote.java | 16 ++++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'main/src') diff --git a/main/src/cgeo/geocaching/Settings.java b/main/src/cgeo/geocaching/Settings.java index 397c8b1..1a58a85 100644 --- a/main/src/cgeo/geocaching/Settings.java +++ b/main/src/cgeo/geocaching/Settings.java @@ -204,10 +204,8 @@ public final class Settings { @Override public void edit(Editor edit) { if (StringUtils.isBlank(memberStatus)) { - // erase password edit.remove(KEY_MEMBER_STATUS); } else { - // save password edit.putString(KEY_MEMBER_STATUS, memberStatus); } } diff --git a/main/src/cgeo/geocaching/gcvote/GCVote.java b/main/src/cgeo/geocaching/gcvote/GCVote.java index 663fd20..c98d4d9 100644 --- a/main/src/cgeo/geocaching/gcvote/GCVote.java +++ b/main/src/cgeo/geocaching/gcvote/GCVote.java @@ -118,7 +118,7 @@ public final class GCVote { } } } catch (Exception e) { - Log.w(Settings.tag, "cgBase.getRating: Failed to parse guid"); + Log.w(Settings.tag, "GCVote.getRating: Failed to parse guid"); } if (guid == null) { continue; @@ -135,7 +135,7 @@ public final class GCVote { } } } catch (Exception e) { - Log.w(Settings.tag, "cgBase.getRating: Failed to parse loggedIn"); + Log.w(Settings.tag, "GCVote.getRating: Failed to parse loggedIn"); } float rating = 0; @@ -145,7 +145,7 @@ public final class GCVote { rating = Float.parseFloat(matcherRating.group(1)); } } catch (Exception e) { - Log.w(Settings.tag, "cgBase.getRating: Failed to parse rating"); + Log.w(Settings.tag, "GCVote.getRating: Failed to parse rating"); } if (rating <= 0) { continue; @@ -158,7 +158,7 @@ public final class GCVote { votes = Integer.parseInt(matcherVotes.group(1)); } } catch (Exception e) { - Log.w(Settings.tag, "cgBase.getRating: Failed to parse vote count"); + Log.w(Settings.tag, "GCVote.getRating: Failed to parse vote count"); } if (votes < 0) { continue; @@ -172,7 +172,7 @@ public final class GCVote { myVote = Float.parseFloat(matcherVote.group(1)); } } catch (Exception e) { - Log.w(Settings.tag, "cgBase.getRating: Failed to parse user's vote"); + Log.w(Settings.tag, "GCVote.getRating: Failed to parse user's vote"); } } @@ -183,7 +183,7 @@ public final class GCVote { } } } catch (Exception e) { - Log.e(Settings.tag, "cgBase.getRating: " + e.toString()); + Log.e(Settings.tag, "GCVote.getRating: " + e.toString()); } return ratings; @@ -238,6 +238,10 @@ public final class GCVote { } } + if (guids.isEmpty()) { + return; + } + try { final Map ratings = GCVote.getRating(guids, null); -- cgit v1.1