Bug 1258789 - Add a few more to WhitespaceAround and fix. r=grisha draft
authorMichael Comella <michael.l.comella@gmail.com>
Tue, 12 Apr 2016 18:27:20 -0700
changeset 350246 1bda7fa0a606feff4adfc565524e125b3dbe8312
parent 350245 27e7eab179cf26fbf877f15d7d4dc70ffb3a9725
child 350247 4cfb3d835d2fc17471c227f6f9c9ed8699b2ec85
push id15281
push usermichael.l.comella@gmail.com
push dateWed, 13 Apr 2016 02:23:27 +0000
reviewersgrisha
bugs1258789
milestone48.0a1
Bug 1258789 - Add a few more to WhitespaceAround and fix. r=grisha MozReview-Commit-ID: AkJEXhlp3Rf
mobile/android/app/checkstyle.xml
mobile/android/base/java/org/mozilla/gecko/prompts/PromptListAdapter.java
--- a/mobile/android/app/checkstyle.xml
+++ b/mobile/android/app/checkstyle.xml
@@ -49,14 +49,19 @@
             <property name="tokens" value="IMPORT,PACKAGE_DEF"/>
         </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="allowEmptyConstructors" value="true"/>
+            <property name="allowEmptyMethods" value="true"/>
+            <property name="allowEmptyTypes" value="true"/>
+            <property name="allowEmptyLoops" value="true"/>
             <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_WHILE"/>
+                    LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE,
+                    LOR, LT, NOT_EQUAL, QUESTION"/>
         </module>
     </module>
 
 </module>
--- a/mobile/android/base/java/org/mozilla/gecko/prompts/PromptListAdapter.java
+++ b/mobile/android/base/java/org/mozilla/gecko/prompts/PromptListAdapter.java
@@ -144,28 +144,28 @@ public class PromptListAdapter extends A
     boolean isSelected(int position){
         return getItem(position).getSelected();
     }
 
     ArrayList<Integer> getSelected() {
         int length = getCount();
 
         ArrayList<Integer> selected = new ArrayList<Integer>();
-        for (int i = 0; i< length; i++) {
+        for (int i = 0; i < length; i++) {
             if (isSelected(i)) {
                 selected.add(i);
             }
         }
 
         return selected;
     }
 
     int getSelectedIndex() {
         int length = getCount();
-        for (int i = 0; i< length; i++) {
+        for (int i = 0; i < length; i++) {
             if (isSelected(i)) {
                 return i;
             }
         }
         return -1;
     }
 
     private View getActionView(PromptListItem item, final ListView list, final int position) {