From b69bba01da1ff493602d2f926638ceb8676d3546 Mon Sep 17 00:00:00 2001 From: cketti Date: Sat, 3 Jan 2015 02:02:54 +0100 Subject: [PATCH] Fix DM_BOXED_PRIMITIVE_FOR_PARSING findbugs warning --- k9mail/src/main/java/com/fsck/k9/activity/MessageCompose.java | 2 +- .../main/java/com/fsck/k9/cache/EmailProviderCacheCursor.java | 4 ++-- .../java/com/fsck/k9/preferences/TimePickerPreference.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/k9mail/src/main/java/com/fsck/k9/activity/MessageCompose.java b/k9mail/src/main/java/com/fsck/k9/activity/MessageCompose.java index bc452f28c..0129b82e1 100644 --- a/k9mail/src/main/java/com/fsck/k9/activity/MessageCompose.java +++ b/k9mail/src/main/java/com/fsck/k9/activity/MessageCompose.java @@ -2888,7 +2888,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, int cursorPosition = 0; if (k9identity.containsKey(IdentityField.CURSOR_POSITION)) { try { - cursorPosition = Integer.valueOf(k9identity.get(IdentityField.CURSOR_POSITION)).intValue(); + cursorPosition = Integer.parseInt(k9identity.get(IdentityField.CURSOR_POSITION)); } catch (Exception e) { Log.e(K9.LOG_TAG, "Could not parse cursor position for MessageCompose; continuing.", e); } diff --git a/k9mail/src/main/java/com/fsck/k9/cache/EmailProviderCacheCursor.java b/k9mail/src/main/java/com/fsck/k9/cache/EmailProviderCacheCursor.java index fdf75993a..55e4882fd 100644 --- a/k9mail/src/main/java/com/fsck/k9/cache/EmailProviderCacheCursor.java +++ b/k9mail/src/main/java/com/fsck/k9/cache/EmailProviderCacheCursor.java @@ -65,12 +65,12 @@ public class EmailProviderCacheCursor extends CursorWrapper { String value = mCache.getValueForMessage(messageId, columnName); if (value != null) { - return Integer.valueOf(value); + return Integer.parseInt(value); } value = mCache.getValueForThread(threadRootId, columnName); if (value != null) { - return Integer.valueOf(value); + return Integer.parseInt(value); } return super.getInt(columnIndex); diff --git a/k9mail/src/main/java/com/fsck/k9/preferences/TimePickerPreference.java b/k9mail/src/main/java/com/fsck/k9/preferences/TimePickerPreference.java index 2675292e8..24e418f7a 100644 --- a/k9mail/src/main/java/com/fsck/k9/preferences/TimePickerPreference.java +++ b/k9mail/src/main/java/com/fsck/k9/preferences/TimePickerPreference.java @@ -145,7 +145,7 @@ public class TimePickerPreference extends DialogPreference implements return -1; } - return Integer.valueOf(time.split(":")[0]); + return Integer.parseInt(time.split(":")[0]); } /** @@ -159,7 +159,7 @@ public class TimePickerPreference extends DialogPreference implements return -1; } - return Integer.valueOf(time.split(":")[1]); + return Integer.parseInt(time.split(":")[1]); } /**