From ee32f11bedeb761e07e8acd8d3041b73cd9adcf2 Mon Sep 17 00:00:00 2001 From: Michael Comella Date: Tue, 12 Apr 2016 18:18:02 -0700 Subject: [PATCH] Bug 1258789 - Add if & return for WhitespaceAround. r=grisha MozReview-Commit-ID: HcWrFHy2CeP --HG-- extra : rebase_source : c687476ab0ee6fb1054e507cb50495e55e856725 --- mobile/android/app/checkstyle.xml | 2 +- mobile/android/base/java/org/mozilla/gecko/ContactService.java | 2 +- .../base/java/org/mozilla/gecko/DownloadsIntegration.java | 2 +- .../android/base/java/org/mozilla/gecko/NotificationHelper.java | 2 +- .../base/java/org/mozilla/gecko/home/SearchEngineRow.java | 2 +- .../base/java/org/mozilla/gecko/tabqueue/TabQueueHelper.java | 2 +- .../base/java/org/mozilla/gecko/widget/DateTimePicker.java | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mobile/android/app/checkstyle.xml b/mobile/android/app/checkstyle.xml index 70d78de8635e..8410ea58ed17 100644 --- a/mobile/android/app/checkstyle.xml +++ b/mobile/android/app/checkstyle.xml @@ -55,7 +55,7 @@ + LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN"/> diff --git a/mobile/android/base/java/org/mozilla/gecko/ContactService.java b/mobile/android/base/java/org/mozilla/gecko/ContactService.java index 84d9b48e1441..994ac824dfab 100644 --- a/mobile/android/base/java/org/mozilla/gecko/ContactService.java +++ b/mobile/android/base/java/org/mozilla/gecko/ContactService.java @@ -946,7 +946,7 @@ public class ContactService implements GeckoEventListener { } String returnStatus = "KO"; - if(deleteContact(rawContactId)) { + if (deleteContact(rawContactId)) { returnStatus = "OK"; } diff --git a/mobile/android/base/java/org/mozilla/gecko/DownloadsIntegration.java b/mobile/android/base/java/org/mozilla/gecko/DownloadsIntegration.java index de3e63500090..57a74e6f2424 100644 --- a/mobile/android/base/java/org/mozilla/gecko/DownloadsIntegration.java +++ b/mobile/android/base/java/org/mozilla/gecko/DownloadsIntegration.java @@ -223,7 +223,7 @@ public class DownloadsIntegration implements NativeEventListener @Override public void onScanCompleted(String path, Uri uri) { - if(path.equals(mFile)) { + if (path.equals(mFile)) { mScanner.disconnect(); mScanner = null; } diff --git a/mobile/android/base/java/org/mozilla/gecko/NotificationHelper.java b/mobile/android/base/java/org/mozilla/gecko/NotificationHelper.java index 4e550f36545a..dbaa5c651631 100644 --- a/mobile/android/base/java/org/mozilla/gecko/NotificationHelper.java +++ b/mobile/android/base/java/org/mozilla/gecko/NotificationHelper.java @@ -208,7 +208,7 @@ public final class NotificationHelper implements GeckoEventListener { try { // Action name must be in query uri, otherwise buttons pending intents // would be collapsed. - if(action.has(ACTION_ID_ATTR)) { + if (action.has(ACTION_ID_ATTR)) { builder.appendQueryParameter(ACTION_ID_ATTR, action.getString(ACTION_ID_ATTR)); } else { Log.i(LOGTAG, "button event with no name"); diff --git a/mobile/android/base/java/org/mozilla/gecko/home/SearchEngineRow.java b/mobile/android/base/java/org/mozilla/gecko/home/SearchEngineRow.java index 17a4a2c2d9ea..2678d2809767 100644 --- a/mobile/android/base/java/org/mozilla/gecko/home/SearchEngineRow.java +++ b/mobile/android/base/java/org/mozilla/gecko/home/SearchEngineRow.java @@ -185,7 +185,7 @@ class SearchEngineRow extends AnimatedHeightLayout { while(indexOfMatch != -1) { indexOfMatch = string.indexOf(pattern, lastIndexOfMatch); lastIndexOfMatch = indexOfMatch + patternLength; - if(indexOfMatch != -1) { + if (indexOfMatch != -1) { mOccurrences.add(indexOfMatch); } } diff --git a/mobile/android/base/java/org/mozilla/gecko/tabqueue/TabQueueHelper.java b/mobile/android/base/java/org/mozilla/gecko/tabqueue/TabQueueHelper.java index 6ce0bf0c73f7..9078801e04b1 100644 --- a/mobile/android/base/java/org/mozilla/gecko/tabqueue/TabQueueHelper.java +++ b/mobile/android/base/java/org/mozilla/gecko/tabqueue/TabQueueHelper.java @@ -177,7 +177,7 @@ public class TabQueueHelper { } catch (JSONException e) { url = ""; } - if(!TextUtils.isEmpty(url) && !urlToRemove.equals(url)) { + if (!TextUtils.isEmpty(url) && !urlToRemove.equals(url)) { newArray.put(url); } } diff --git a/mobile/android/base/java/org/mozilla/gecko/widget/DateTimePicker.java b/mobile/android/base/java/org/mozilla/gecko/widget/DateTimePicker.java index 736365f72e0e..df4ab359a316 100644 --- a/mobile/android/base/java/org/mozilla/gecko/widget/DateTimePicker.java +++ b/mobile/android/base/java/org/mozilla/gecko/widget/DateTimePicker.java @@ -182,7 +182,7 @@ public class DateTimePicker extends FrameLayout { if (mDayEnabled) { mDaySpinner.setMaxValue(mCurrentDate.getActualMaximum(Calendar.DAY_OF_MONTH)); } - if(mWeekEnabled) { + if (mWeekEnabled) { mWeekSpinner.setMaxValue(mCurrentDate.getActualMaximum(Calendar.WEEK_OF_YEAR)); } updateCalendar();