diff options
author | Bananeweizen <Bananeweizen@gmx.de> | 2012-12-26 12:59:14 +0100 |
---|---|---|
committer | Bananeweizen <Bananeweizen@gmx.de> | 2012-12-26 12:59:14 +0100 |
commit | e29b64e963af24f9c85c12ea110bf5255ef6fbec (patch) | |
tree | e7e4ffbebed28023d3c1f6a42f6a1910fb1f6646 /cgeo-calendar | |
parent | c29c80e9b8cccc552e6747dbcaf0c5738fadd92a (diff) | |
download | cgeo-e29b64e963af24f9c85c12ea110bf5255ef6fbec.zip cgeo-e29b64e963af24f9c85c12ea110bf5255ef6fbec.tar.gz cgeo-e29b64e963af24f9c85c12ea110bf5255ef6fbec.tar.bz2 |
code cleanup: remove debug code
* fixed some more issues of Findbugs and CodePro
Diffstat (limited to 'cgeo-calendar')
-rw-r--r-- | cgeo-calendar/src/cgeo/calendar/AddEntry.java | 2 | ||||
-rw-r--r-- | cgeo-calendar/src/cgeo/calendar/AddEntryLevel14.java | 2 | ||||
-rw-r--r-- | cgeo-calendar/src/cgeo/calendar/CalendarEntry.java | 6 |
3 files changed, 6 insertions, 4 deletions
diff --git a/cgeo-calendar/src/cgeo/calendar/AddEntry.java b/cgeo-calendar/src/cgeo/calendar/AddEntry.java index 39092cb..b1f97b9 100644 --- a/cgeo-calendar/src/cgeo/calendar/AddEntry.java +++ b/cgeo-calendar/src/cgeo/calendar/AddEntry.java @@ -32,7 +32,7 @@ class AddEntry extends AbstractAddEntry { final ContentValues event = new ContentValues(); event.put("calendar_id", calendarId); if (entry.getStartTimeMinutes() >= 0) { - event.put("dtstart", eventDate.getTime() + entry.getStartTimeMinutes() * 60000); + event.put("dtstart", eventDate.getTime() + entry.getStartTimeMinutes() * 60000L); } else { event.put("dtstart", eventDate.getTime() + 43200000); // noon diff --git a/cgeo-calendar/src/cgeo/calendar/AddEntryLevel14.java b/cgeo-calendar/src/cgeo/calendar/AddEntryLevel14.java index 787be73..44453dd 100644 --- a/cgeo-calendar/src/cgeo/calendar/AddEntryLevel14.java +++ b/cgeo-calendar/src/cgeo/calendar/AddEntryLevel14.java @@ -35,7 +35,7 @@ class AddEntryLevel14 extends AbstractAddEntry { .putExtra("eventTimezone", "UTC") .putExtra("eventLocation", eventLocation); if (entry.getStartTimeMinutes() >= 0) { - intent.putExtra("beginTime", eventDate.getTime() + entry.getStartTimeMinutes() * 60000); + intent.putExtra("beginTime", eventDate.getTime() + entry.getStartTimeMinutes() * 60000L); } else { intent.putExtra("beginTime", eventDate.getTime() + 43200000); diff --git a/cgeo-calendar/src/cgeo/calendar/CalendarEntry.java b/cgeo-calendar/src/cgeo/calendar/CalendarEntry.java index 3e4de73..e31e054 100644 --- a/cgeo-calendar/src/cgeo/calendar/CalendarEntry.java +++ b/cgeo-calendar/src/cgeo/calendar/CalendarEntry.java @@ -2,6 +2,8 @@ package cgeo.calendar; import cgeo.geocaching.utils.Log; +import org.apache.commons.lang3.CharEncoding; + import android.net.Uri; import android.text.Html; import android.text.Spanned; @@ -48,7 +50,7 @@ class CalendarEntry { if (param == null) { return ""; } - return URLDecoder.decode(param, "UTF-8").trim(); + return URLDecoder.decode(param, CharEncoding.UTF_8).trim(); } catch (UnsupportedEncodingException e) { Log.e("CalendarEntry.getParameter", e); } @@ -56,7 +58,7 @@ class CalendarEntry { } public boolean isValid() { - return (getName().length() > 0 && getHiddenDate().length() > 0); + return getName().length() > 0 && getHiddenDate().length() > 0; } public String getHiddenDate() { |