Bug 1258789 - Add while to WhitespaceAround. r=grisha
authorMichael Comella <michael.l.comella@gmail.com>
Tue, 12 Apr 2016 18:21:45 -0700
changeset 316840 f1a36e0e657e0c0f1fbd0747e0b27dbc3c717a93
parent 316839 ebe249484944f34aab6da0539be018751c9a5444
child 316841 cdfaf8bc0e6c4fdd4138815020c8f371c11a5de8
push id9480
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 17:12:58 +0000
treeherdermozilla-aurora@0d6a91c76a9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgrisha
bugs1258789
milestone48.0a1
Bug 1258789 - Add while to WhitespaceAround. r=grisha MozReview-Commit-ID: HhbBCjojNiC
mobile/android/app/checkstyle.xml
mobile/android/base/java/org/mozilla/gecko/ContactService.java
mobile/android/base/java/org/mozilla/gecko/DownloadsIntegration.java
mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
mobile/android/base/java/org/mozilla/gecko/db/LocalURLMetadata.java
mobile/android/base/java/org/mozilla/gecko/db/PasswordsProvider.java
mobile/android/base/java/org/mozilla/gecko/home/SearchEngineRow.java
mobile/android/base/java/org/mozilla/gecko/lwt/LightweightTheme.java
--- a/mobile/android/app/checkstyle.xml
+++ b/mobile/android/app/checkstyle.xml
@@ -50,13 +50,13 @@
         </module>
         <module name="OuterTypeFilename"/> <!-- `class Lol` only in Lol.java -->
         <module name="WhitespaceAfter">
             <!-- TODO: (bug 1263059) Remove specific tokens to enable CAST check. -->
             <property name="tokens" value="COMMA, SEMI"/>
         </module>
         <module name="WhitespaceAround">
             <property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN,
-                    LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY"/>
+                    LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE"/>
         </module>
     </module>
 
 </module>
--- a/mobile/android/base/java/org/mozilla/gecko/ContactService.java
+++ b/mobile/android/base/java/org/mozilla/gecko/ContactService.java
@@ -1725,17 +1725,17 @@ public class ContactService implements G
 
     private long[] getAllRawContactIds() {
         Cursor cursor = getAllRawContactIdsCursor();
 
         // Put the ids into an array
         long[] ids = new long[cursor.getCount()];
         int index = 0;
         cursor.moveToPosition(-1);
-        while(cursor.moveToNext()) {
+        while (cursor.moveToNext()) {
             ids[index] = cursor.getLong(cursor.getColumnIndex(RawContacts._ID));
             index++;
         }
         cursor.close();
 
         return ids;
     }
 
--- a/mobile/android/base/java/org/mozilla/gecko/DownloadsIntegration.java
+++ b/mobile/android/base/java/org/mozilla/gecko/DownloadsIntegration.java
@@ -188,17 +188,17 @@ public class DownloadsIntegration implem
             }
 
             do {
                 final Download d = Download.fromCursor(c);
                 // Try hard as we can to verify this download is the one we think it is
                 if (download.equals(d)) {
                     dm.remove(d.id);
                 }
-            } while(c.moveToNext());
+            } while (c.moveToNext());
         } finally {
             if (c != null) {
                 c.close();
             }
         }
     }
 
     private static final class GeckoMediaScannerClient implements MediaScannerConnectionClient {
--- a/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
@@ -943,17 +943,17 @@ public abstract class GeckoApp
                 byte[] buf = new byte[4192];
                 os = new ByteArrayOutputStream();
                 URL url = new URL(aSrc);
                 is = url.openStream();
 
                 // Cannot read from same stream twice. Also, InputStream from
                 // URL does not support reset. So converting to byte array.
 
-                while((byteRead = is.read(buf)) != -1) {
+                while ((byteRead = is.read(buf)) != -1) {
                     os.write(buf, 0, byteRead);
                 }
                 byte[] imgBuffer = os.toByteArray();
                 image = BitmapUtils.decodeByteArray(imgBuffer);
             }
             if (image != null) {
                 // Some devices don't have a DCIM folder and the Media.insertImage call will fail.
                 File dcimDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
--- a/mobile/android/base/java/org/mozilla/gecko/db/LocalURLMetadata.java
+++ b/mobile/android/base/java/org/mozilla/gecko/db/LocalURLMetadata.java
@@ -194,17 +194,17 @@ public class LocalURLMetadata implements
             }
 
             do {
                 final Map<String, Object> metadata = fromCursor(cursor);
                 final String url = cursor.getString(cursor.getColumnIndexOrThrow(URLMetadataTable.URL_COLUMN));
 
                 data.put(url, metadata);
                 cache.put(url, metadata);
-            } while(cursor.moveToNext());
+            } while (cursor.moveToNext());
 
         } finally {
             cursor.close();
         }
 
         return Collections.unmodifiableMap(data);
     }
 
--- a/mobile/android/base/java/org/mozilla/gecko/db/PasswordsProvider.java
+++ b/mobile/android/base/java/org/mozilla/gecko/db/PasswordsProvider.java
@@ -337,13 +337,13 @@ public class PasswordsProvider extends S
                         String decrypted = doCrypto(cursor.getString(passwordIndex), uri, false);;
                         m.set(passwordIndex, decrypted);
                     }
 
                     if (usernameIndex > -1) {
                         String decrypted = doCrypto(cursor.getString(usernameIndex), uri, false);
                         m.set(usernameIndex, decrypted);
                     }
-                } while(cursor.moveToNext());
+                } while (cursor.moveToNext());
             }
         }
     }
 }
--- a/mobile/android/base/java/org/mozilla/gecko/home/SearchEngineRow.java
+++ b/mobile/android/base/java/org/mozilla/gecko/home/SearchEngineRow.java
@@ -177,17 +177,17 @@ class SearchEngineRow extends AnimatedHe
         if (TextUtils.isEmpty(pattern)) {
             return;
         }
 
         final int patternLength = pattern.length();
 
         int indexOfMatch = 0;
         int lastIndexOfMatch = 0;
-        while(indexOfMatch != -1) {
+        while (indexOfMatch != -1) {
             indexOfMatch = string.indexOf(pattern, lastIndexOfMatch);
             lastIndexOfMatch = indexOfMatch + patternLength;
             if (indexOfMatch != -1) {
                 mOccurrences.add(indexOfMatch);
             }
         }
     }
 
--- a/mobile/android/base/java/org/mozilla/gecko/lwt/LightweightTheme.java
+++ b/mobile/android/base/java/org/mozilla/gecko/lwt/LightweightTheme.java
@@ -366,17 +366,17 @@ public class LightweightTheme implements
             }
 
             parent = curView.getParent();
 
             if (parent instanceof View) {
                 curView = (View) parent;
             }
 
-        } while(parent instanceof View);
+        } while (parent instanceof View);
 
         // Adjust the coordinates for the offset.
         left -= offsetX;
         right -= offsetX;
         top -= offsetY;
         bottom -= offsetY;
 
         // The either the required height may be less than the available image height or more than it.