You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by wf...@apache.org on 2014/05/21 23:55:29 UTC

git commit: Enable a few checkstyle checks.

Repository: incubator-aurora
Updated Branches:
  refs/heads/master 0df27d7ae -> b20708852


Enable a few checkstyle checks.

Reviewed at https://reviews.apache.org/r/21753/


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/b2070885
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/b2070885
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/b2070885

Branch: refs/heads/master
Commit: b20708852812be3a15754c6f9ab1217ee7e78ec8
Parents: 0df27d7
Author: Bill Farner <wf...@apache.org>
Authored: Wed May 21 14:54:45 2014 -0700
Committer: Bill Farner <wf...@apache.org>
Committed: Wed May 21 14:54:45 2014 -0700

----------------------------------------------------------------------
 config/checkstyle/checkstyle.xml                | 402 ++++++++++---------
 .../scheduler/async/GcExecutorLauncher.java     |   2 +-
 .../aurora/scheduler/async/OfferQueue.java      |   2 +-
 .../aurora/scheduler/async/TaskScheduler.java   |   2 +-
 .../scheduler/base/ResourceAggregates.java      |   4 +-
 .../scheduler/configuration/Resources.java      |   6 +-
 .../aurora/scheduler/cron/CrontabEntry.java     |  28 +-
 .../scheduler/state/MaintenanceController.java  |   2 +-
 .../scheduler/state/SchedulerCoreImpl.java      |   1 -
 .../thrift/SchedulerThriftInterface.java        |   1 -
 .../scheduler/async/TaskSchedulerTest.java      |   1 -
 .../configuration/ConfigurationManagerTest.java |   1 -
 .../scheduler/state/TaskAssignerImplTest.java   |   1 -
 .../storage/log/SnapshotStoreImplTest.java      |   1 -
 .../thrift/SchedulerThriftInterfaceTest.java    |   1 -
 15 files changed, 233 insertions(+), 222 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b2070885/config/checkstyle/checkstyle.xml
----------------------------------------------------------------------
diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml
index 8e869f3..367304d 100644
--- a/config/checkstyle/checkstyle.xml
+++ b/config/checkstyle/checkstyle.xml
@@ -47,210 +47,220 @@ limitations under the License.
 
 <module name="Checker">
   <!--
-        If you set the basedir property below, then all reported file
-        names will be relative to the specified directory. See
-        http://checkstyle.sourceforge.net/config.html#Checker
-        <property name="basedir" value="${basedir}"/>
-          -->
+      If you set the basedir property below, then all reported file
+      names will be relative to the specified directory. See
+      http://checkstyle.sourceforge.net/config.html#Checker
+      <property name="basedir" value="${basedir}"/>
+        -->
+
+  <!-- Checks whether files end with a new line.                        -->
+  <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
+  <module name="NewlineAtEndOfFile"/>
+
+  <!-- Disallows multiple sequential newlines. -->
+  <module name="RegexpMultiline">
+    <property name="format" value="\n{3,}"/>
+    <property name="message" value="File contains a sequence of empty lines."/>
+  </module>
+
+  <!-- Checks for whitespace                               -->
+  <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+  <module name="FileTabCharacter"/>
+
+  <!-- Miscellaneous other checks.                   -->
+  <!-- See http://checkstyle.sf.net/config_misc.html -->
+  <module name="RegexpSingleline">
+    <property name="format" value="\s+$"/>
+    <property name="minimum" value="0"/>
+    <property name="maximum" value="0"/>
+    <property name="message" value="Line has trailing spaces."/>
+  </module>
+
+  <module name="RegexpHeader">
+    <property name="headerFile" value="config/checkstyle/apache.header.regex"/>
+    <property name="fileExtensions" value="java"/>
+  </module>
+
+  <module name="TreeWalker">
+    <property name="tabWidth" value="2"/>
+
+    <!-- needed for SuppressWithNearbyCommentFilter -->
+    <module name="FileContentsHolder"/>
+
+    <!-- Annotations -->
+    <module name="AnnotationUseStyle"/>
+    <module name="MissingDeprecated"/>
+    <module name="MissingOverride"/>
+    <module name="PackageAnnotation"/>
+
+    <module name="JavadocType">
+      <property name="excludeScope" value="private"/>
+    </module>
+    <module name="JavadocStyle">
+      <property name="checkEmptyJavadoc" value="true"/>
+    </module>
+    <module name="JavadocVariable">
+      <property name="excludeScope" value="private"/>
+    </module>
+
+    <!-- Checks for Naming Conventions.                  -->
+    <module name="ClassTypeParameterName"/>
+    <module name="ConstantName"/>
+    <module name="LocalFinalVariableName">
+      <!-- allow VAR_NAME and varName in local final variables,
+      leave it up to user to use them appropriately depending on whether
+      or not the variable is A_CONSTANT_VARIBLE, or aMutableVariable.
+      -->
+      <property name="format" value="^(([a-z][a-zA-Z0-9]*)|([A-Z][A-Z0-9]*(_[A-Z0-9]+)*))$" />
+    </module>
+    <module name="LocalVariableName"/>
+    <module name="MemberName"/>
+    <module name="MethodTypeParameterName"/>
+    <module name="PackageName"/>
+    <module name="ParameterName"/>
+    <module name="StaticVariableName"/>
+    <module name="TypeName"/>
+
+    <!-- Checks for imports                              -->
+    <!-- See http://checkstyle.sf.net/config_import.html -->
+    <module name="AvoidStarImport">
+      <property name="excludes" value="org.junit.Assert"/>
+      <property name="excludes" value="java.util.*"/>
+    </module>
+    <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
+    <module name="RedundantImport"/>
+    <module name="UnusedImports"/>
+    <module name="ImportOrder">
+      <property name="groups"
+        value="/^javax?\./,scala,com,net,org"/>
+      <property name="ordered" value="true"/>
+      <property name="separated" value="true"/>
+      <property name="option" value="bottom"/>
+      <message key="import.ordering"
+        value="Wrong order for ''{0}'' import. Order should be: java, javax, scala, com, net, org.
+        Each group should be separated by a single blank line." />
+    </module>
 
-    <!-- Checks whether files end with a new line.                        -->
-    <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
-    <module name="NewlineAtEndOfFile"/>
+    <!-- Checks for Size Violations.                    -->
+    <!-- See http://checkstyle.sf.net/config_sizes.html -->
+    <module name="LineLength">
+      <property name="max" value="100"/>
+      <property name="ignorePattern" value="^import"/>
+    </module>
+    <module name="OuterTypeNumber"/>
 
     <!-- Checks for whitespace                               -->
     <!-- See http://checkstyle.sf.net/config_whitespace.html -->
-    <module name="FileTabCharacter"/>
+    <module name="EmptyForInitializerPad"/>
+    <module name="EmptyForIteratorPad"/>
+    <module name="MethodParamPad"/>
+    <module name="NoWhitespaceAfter"/>
+    <module name="NoWhitespaceBefore"/>
+    <module name="OperatorWrap"/>
+    <module name="ParenPad"/>
+    <module name="TypecastParenPad"/>
+    <module name="WhitespaceAfter"/>
+    <module name="WhitespaceAround">
+      <!-- Intentionally excludes RCURLY (default) since it trips on anonymous
+           inner class declarations when chained with a method call.
+      -->
+      <property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,
+        BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,
+        LCURLY,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,
+        LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,
+        LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,
+        LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,
+        NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,SL,SLIST,SL_ASSIGN,
+        SR,SR_ASSIGN,STAR,STAR_ASSIGN,TYPE_EXTENSION_AND"/>
+    </module>
 
-    <!-- Miscellaneous other checks.                   -->
-    <!-- See http://checkstyle.sf.net/config_misc.html -->
-    <module name="RegexpSingleline">
-      <property name="format" value="\s+$"/>
-      <property name="minimum" value="0"/>
-      <property name="maximum" value="0"/>
-      <property name="message" value="Line has trailing spaces."/>
+    <!-- Modifier Checks                                    -->
+    <!-- See http://checkstyle.sf.net/config_modifiers.html -->
+    <module name="ModifierOrder"/>
+    <module name="RedundantModifier"/>
+
+    <!-- Checks for blocks. You know, those {}'s         -->
+    <!-- See http://checkstyle.sf.net/config_blocks.html -->
+    <module name="AvoidNestedBlocks"/>
+    <module name="EmptyBlock">
+      <!-- Allow comments to satisfy the EmptyBlock check -->
+      <property name="option" value="text"/>
+    </module>
+    <module name="LeftCurly"/>
+    <module name="NeedBraces"/>
+    <module name="RightCurly"/>
+
+    <!-- Checks for common coding problems               -->
+    <!-- See http://checkstyle.sf.net/config_coding.html -->
+    <module name="CovariantEquals"/>
+    <module name="EmptyStatement"/>
+    <module name="EqualsAvoidNull"/>
+    <module name="EqualsHashCode"/>
+    <module name="HiddenField">
+      <property name="ignoreConstructorParameter" value="true"/>
+      <property name="ignoreSetter" value="true"/>
     </module>
 
-    <module name="RegexpHeader">
-      <property name="headerFile" value="config/checkstyle/apache.header.regex"/>
-      <property name="fileExtensions" value="java"/>
+    <!-- disallow calling constructors on these classes
+         calling factories is the only way to create these objects
+    -->
+    <module name="IllegalInstantiation">
+      <property name="classes" value="java.lang.Boolean"/>
+    </module>
+    <module name="IllegalToken">
+      <property name="tokens" value="LITERAL_NATIVE"/>
     </module>
+    <module name="InnerAssignment"/>
+    <module name="MissingSwitchDefault"/>
+    <module name="ModifiedControlVariable"/>
+    <module name="SimplifyBooleanExpression"/>
+    <module name="SimplifyBooleanReturn"/>
+    <module name="StringLiteralEquality"/>
+    <module name="SuppressWarnings"/>
+    <module name="NestedForDepth">
+      <property name="max" value="2"/>
+    </module>
+    <module name="NestedTryDepth">
+      <property name="max" value="1"/>
+    </module>
+    <module name="NoClone"/>
+    <module name="NoFinalizer"/>
+    <module name="SuperClone"/>
+    <module name="SuperFinalize"/>
+    <module name="PackageDeclaration">
+      <property name="ignoreDirectoryName" value="true"/>
+    </module>
+    <module name="JUnitTestCase"/>
+    <module name="ParameterAssignment"/>
+    <module name="DefaultComesLast"/>
+    <module name="FallThrough"/>
+    <module name="MultipleVariableDeclarations"/>
+    <module name="UnnecessaryParentheses"/>
+    <module name="OneStatementPerLine"/>
+
+    <module name="FinalClass"/>
+    <module name="HideUtilityClassConstructor"/>
+    <module name="InterfaceIsType"/>
+    <module name="VisibilityModifier">
+      <property name="protectedAllowed" value="true"/>
+      <!-- Allow public members at the coder's discretion, for struct-like things. -->
+      <property name="publicMemberPattern" value="^.*$" />
+    </module>
+    <module name="MutableException"/>
 
-    <module name="TreeWalker">
-      <property name="tabWidth" value="2"/>
-
-      <!-- needed for SuppressWithNearbyCommentFilter -->
-      <module name="FileContentsHolder"/>
-
-      <!-- Annotations -->
-      <module name="AnnotationUseStyle"/>
-      <module name="MissingDeprecated"/>
-      <module name="MissingOverride"/>
-      <module name="PackageAnnotation"/>
-
-      <module name="JavadocType">
-        <property name="excludeScope" value="private"/>
-      </module>
-      <module name="JavadocStyle">
-        <property name="checkFirstSentence" value="false"/>
-        <property name="checkEmptyJavadoc" value="true"/>
-      </module>
-
-      <!-- Checks for Naming Conventions.                  -->
-      <module name="ClassTypeParameterName"/>
-      <module name="ConstantName"/>
-      <module name="LocalFinalVariableName">
-        <!-- allow VAR_NAME and varName in local final variables,
-        leave it up to user to use them appropriately depending on whether
-        or not the variable is A_CONSTANT_VARIBLE, or aMutableVariable.
-        -->
-        <property name="format" value="^(([a-z][a-zA-Z0-9]*)|([A-Z][A-Z0-9]*(_[A-Z0-9]+)*))$" />
-      </module>
-      <module name="LocalVariableName"/>
-      <module name="MemberName"/>
-      <module name="MethodTypeParameterName"/>
-      <module name="PackageName"/>
-      <module name="ParameterName"/>
-      <module name="StaticVariableName"/>
-      <module name="TypeName"/>
-
-      <!-- Checks for imports                              -->
-      <!-- See http://checkstyle.sf.net/config_import.html -->
-      <module name="AvoidStarImport">
-        <property name="excludes" value="org.junit.Assert"/>
-        <property name="excludes" value="java.util.*"/>
-      </module>
-      <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
-      <module name="RedundantImport"/>
-      <module name="UnusedImports"/>
-      <module name="ImportOrder">
-        <property name="groups"
-          value="/^javax?\./,scala,com,net,org"/>
-        <property name="ordered" value="true"/>
-        <property name="separated" value="true"/>
-        <property name="option" value="bottom"/>
-        <message key="import.ordering"
-          value="Wrong order for ''{0}'' import. Order should be: java, javax, scala, com, net, org.
-          Each group should be separated by a single blank line." />
-      </module>
-
-      <!-- Checks for Size Violations.                    -->
-      <!-- See http://checkstyle.sf.net/config_sizes.html -->
-      <module name="LineLength">
-        <property name="max" value="100"/>
-        <property name="ignorePattern" value="^import"/>
-      </module>
-      <module name="OuterTypeNumber"/>
-
-      <!-- Checks for whitespace                               -->
-      <!-- See http://checkstyle.sf.net/config_whitespace.html -->
-      <module name="EmptyForInitializerPad"/>
-      <module name="EmptyForIteratorPad"/>
-      <module name="MethodParamPad"/>
-      <module name="NoWhitespaceAfter"/>
-      <module name="NoWhitespaceBefore"/>
-      <module name="OperatorWrap"/>
-      <module name="ParenPad"/>
-      <module name="TypecastParenPad"/>
-      <module name="WhitespaceAfter"/>
-      <module name="WhitespaceAround">
-        <!-- Intentionally excludes RCURLY (default) since it trips on anonymous
-             inner class declarations when chained with a method call.
-        -->
-        <property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,
-          BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,
-          LCURLY,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,
-          LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,
-          LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,
-          LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,
-          NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,SL,SLIST,SL_ASSIGN,
-          SR,SR_ASSIGN,STAR,STAR_ASSIGN,TYPE_EXTENSION_AND"/>
-      </module>
-
-      <!-- Modifier Checks                                    -->
-      <!-- See http://checkstyle.sf.net/config_modifiers.html -->
-      <module name="ModifierOrder"/>
-      <module name="RedundantModifier"/>
-
-      <!-- Checks for blocks. You know, those {}'s         -->
-      <!-- See http://checkstyle.sf.net/config_blocks.html -->
-      <module name="AvoidNestedBlocks"/>
-      <module name="EmptyBlock">
-        <!-- Allow comments to satisfy the EmptyBlock check -->
-        <property name="option" value="text"/>
-      </module>
-      <module name="LeftCurly"/>
-      <module name="NeedBraces"/>
-      <module name="RightCurly"/>
-
-      <!-- Checks for common coding problems               -->
-      <!-- See http://checkstyle.sf.net/config_coding.html -->
-      <module name="CovariantEquals"/>
-      <module name="EmptyStatement"/>
-      <module name="EqualsAvoidNull"/>
-      <module name="EqualsHashCode"/>
-      <module name="HiddenField">
-        <property name="ignoreConstructorParameter" value="true"/>
-        <property name="ignoreSetter" value="true"/>
-      </module>
-
-      <!-- disallow calling constructors on these classes
-           calling factories is the only way to create these objects
-      -->
-      <module name="IllegalInstantiation">
-        <property name="classes" value="java.lang.Boolean"/>
-      </module>
-      <module name="IllegalToken">
-        <property name="tokens" value="LITERAL_NATIVE"/>
-      </module>
-      <module name="MissingSwitchDefault"/>
-      <module name="ModifiedControlVariable"/>
-      <module name="SimplifyBooleanExpression"/>
-      <module name="SimplifyBooleanReturn"/>
-      <module name="StringLiteralEquality"/>
-      <module name="NestedForDepth">
-        <property name="max" value="2"/>
-      </module>
-      <module name="NestedTryDepth">
-        <property name="max" value="1"/>
-      </module>
-      <module name="NoClone"/>
-      <module name="NoFinalizer"/>
-      <module name="SuperClone"/>
-      <module name="SuperFinalize"/>
-      <module name="PackageDeclaration">
-        <property name="ignoreDirectoryName" value="true"/>
-      </module>
-      <module name="JUnitTestCase"/>
-      <module name="ParameterAssignment"/>
-      <module name="DefaultComesLast"/>
-      <module name="FallThrough"/>
-      <module name="MultipleVariableDeclarations"/>
-      <module name="UnnecessaryParentheses"/>
-      <module name="OneStatementPerLine"/>
-
-      <module name="FinalClass"/>
-      <module name="HideUtilityClassConstructor"/>
-      <module name="InterfaceIsType"/>
-      <module name="VisibilityModifier">
-        <property name="protectedAllowed" value="true"/>
-        <!-- Allow public members at the coder's discretion, for struct-like things. -->
-        <property name="publicMemberPattern" value="^.*$" />
-      </module>
-      <module name="MutableException"/>
-
-      <!-- Miscellaneous other checks.                   -->
-      <!-- See http://checkstyle.sf.net/config_misc.html -->
-      <module name="ArrayTypeStyle"/>
-      <module name="UpperEll"/>
-      <module name="ArrayTypeStyle"/>
-      <module name="OuterTypeFilename"/>
-
-      <!-- Regexp checks -->
-      <module name="RegexpSinglelineJava">
-        <property name="format" value="System.exit"/>
-        <property name="ignoreComments" value="true"/>
-        <property name="message"
-          value="Don't System.exit(), throw a RuntimeException()" />
-      </module>
+    <!-- Miscellaneous other checks.                   -->
+    <!-- See http://checkstyle.sf.net/config_misc.html -->
+    <module name="ArrayTypeStyle"/>
+    <module name="UpperEll"/>
+    <module name="ArrayTypeStyle"/>
+    <module name="OuterTypeFilename"/>
+
+    <!-- Regexp checks -->
+    <module name="RegexpSinglelineJava">
+      <property name="format" value="System.exit"/>
+      <property name="ignoreComments" value="true"/>
+      <property name="message"
+        value="Don't System.exit(), throw a RuntimeException()" />
     </module>
   </module>
+</module>

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b2070885/src/main/java/org/apache/aurora/scheduler/async/GcExecutorLauncher.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/async/GcExecutorLauncher.java b/src/main/java/org/apache/aurora/scheduler/async/GcExecutorLauncher.java
index e599cac..b6624d7 100644
--- a/src/main/java/org/apache/aurora/scheduler/async/GcExecutorLauncher.java
+++ b/src/main/java/org/apache/aurora/scheduler/async/GcExecutorLauncher.java
@@ -67,7 +67,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
 
 /**
  * A task launcher that periodically initiates garbage collection on a host, re-using a single
- * garbage collection executor
+ * garbage collection executor.
  */
 public class GcExecutorLauncher implements TaskLauncher {
   private static final Logger LOG = Logger.getLogger(GcExecutorLauncher.class.getName());

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b2070885/src/main/java/org/apache/aurora/scheduler/async/OfferQueue.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/async/OfferQueue.java b/src/main/java/org/apache/aurora/scheduler/async/OfferQueue.java
index 87c3797..e8acf0a 100644
--- a/src/main/java/org/apache/aurora/scheduler/async/OfferQueue.java
+++ b/src/main/java/org/apache/aurora/scheduler/async/OfferQueue.java
@@ -57,7 +57,7 @@ import static org.apache.aurora.gen.MaintenanceMode.NONE;
 import static org.apache.aurora.gen.MaintenanceMode.SCHEDULED;
 
 /**
- * Tracks the Offers currently known by the scheduler
+ * Tracks the Offers currently known by the scheduler.
  */
 public interface OfferQueue extends EventSubscriber {
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b2070885/src/main/java/org/apache/aurora/scheduler/async/TaskScheduler.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/async/TaskScheduler.java b/src/main/java/org/apache/aurora/scheduler/async/TaskScheduler.java
index f7f418a..8fa08b2 100644
--- a/src/main/java/org/apache/aurora/scheduler/async/TaskScheduler.java
+++ b/src/main/java/org/apache/aurora/scheduler/async/TaskScheduler.java
@@ -92,7 +92,7 @@ interface TaskScheduler extends EventSubscriber {
    */
   class TaskSchedulerImpl implements TaskScheduler {
     /**
-     * Binding annotation for the time duration of reservations
+     * Binding annotation for the time duration of reservations.
      */
     @BindingAnnotation
     @Target({ FIELD, PARAMETER, METHOD }) @Retention(RUNTIME)

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b2070885/src/main/java/org/apache/aurora/scheduler/base/ResourceAggregates.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/base/ResourceAggregates.java b/src/main/java/org/apache/aurora/scheduler/base/ResourceAggregates.java
index 7804300..0739792 100644
--- a/src/main/java/org/apache/aurora/scheduler/base/ResourceAggregates.java
+++ b/src/main/java/org/apache/aurora/scheduler/base/ResourceAggregates.java
@@ -54,7 +54,7 @@ public final class ResourceAggregates {
   }
 
   /**
-   * a * m
+   * a * m.
    */
   public static IResourceAggregate scale(IResourceAggregate a, int m) {
     return IResourceAggregate.build(new ResourceAggregate()
@@ -64,7 +64,7 @@ public final class ResourceAggregates {
   }
 
   /**
-   * a / b
+   * a / b.
    * <p>
    * This calculates how many times {@code b} "fits into" {@code a}.  Behavior is undefined when
    * {@code b} contains resources with a value of zero.

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b2070885/src/main/java/org/apache/aurora/scheduler/configuration/Resources.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/configuration/Resources.java b/src/main/java/org/apache/aurora/scheduler/configuration/Resources.java
index 9139b06..a2679c3 100644
--- a/src/main/java/org/apache/aurora/scheduler/configuration/Resources.java
+++ b/src/main/java/org/apache/aurora/scheduler/configuration/Resources.java
@@ -205,7 +205,7 @@ public class Resources {
   }
 
   /**
-   * a - b
+   * a - b.
    */
   public static Resources subtract(Resources a, Resources b) {
     return new Resources(
@@ -216,14 +216,14 @@ public class Resources {
   }
 
   /**
-   * sum(a, b)
+   * sum(a, b).
    */
   public static Resources sum(Resources a, Resources b) {
     return sum(ImmutableList.of(a, b));
   }
 
   /**
-   * sum(rs)
+   * sum(rs).
    */
   public static Resources sum(Iterable<Resources> rs) {
     Resources sum = none();

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b2070885/src/main/java/org/apache/aurora/scheduler/cron/CrontabEntry.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/cron/CrontabEntry.java b/src/main/java/org/apache/aurora/scheduler/cron/CrontabEntry.java
index 6411244..99ce7d1 100644
--- a/src/main/java/org/apache/aurora/scheduler/cron/CrontabEntry.java
+++ b/src/main/java/org/apache/aurora/scheduler/cron/CrontabEntry.java
@@ -193,7 +193,6 @@ public final class CrontabEntry {
     return getDayOfMonth().encloses(DAY_OF_MONTH);
   }
 
-
   @VisibleForTesting
   boolean hasWildcardMonth() {
     return getMonth().encloses(MONTH);
@@ -259,7 +258,7 @@ public final class CrontabEntry {
 
   /**
    * Returns a parsable string representation schedule such that
-   * c.equals(CrontabEntry.parse(c.toString())
+   * {@code c.equals(CrontabEntry.parse(c.toString())}.
    */
   @Override
   public String toString() {
@@ -389,15 +388,18 @@ public final class CrontabEntry {
         return ImmutableRangeSet.of(enclosure);
       }
 
-      Matcher matcher;
-      if ((matcher = NUMBER.matcher(rawComponent)).matches()) {
+      Matcher matcher = NUMBER.matcher(rawComponent);
+      if (matcher.matches()) {
         int number = Integer.parseInt(matcher.group("number"));
         Range<Integer> range = Range.singleton(number).canonical(DiscreteDomain.integers());
 
         checkArgument(enclosure.encloses(range), enclosure + " does not enclose " + range);
 
         return ImmutableRangeSet.of(range);
-      } else if ((matcher = RANGE.matcher(rawComponent)).matches()) {
+      }
+
+      matcher = RANGE.matcher(rawComponent);
+      if (matcher.matches()) {
         int lower = Integer.parseInt(matcher.group("lower"));
         int upper = Integer.parseInt(matcher.group("upper"));
         Range<Integer> range = Range.closed(lower, upper).canonical(DiscreteDomain.integers());
@@ -405,7 +407,10 @@ public final class CrontabEntry {
         checkArgument(enclosure.encloses(range), enclosure + " does not enclose " + range);
 
         return ImmutableRangeSet.of(range);
-      } else if ((matcher = WILDCARD_WITH_SKIP.matcher(rawComponent)).matches()) {
+      }
+
+      matcher = WILDCARD_WITH_SKIP.matcher(rawComponent);
+      if (matcher.matches()) {
         int skip = Integer.parseInt(matcher.group("skip"));
         int start = enclosure.lowerEndpoint();
 
@@ -416,7 +421,10 @@ public final class CrontabEntry {
           rangeSet.add(Range.singleton(i).canonical(DiscreteDomain.integers()));
         }
         return rangeSet.build();
-      } else if ((matcher = RANGE_WITH_SKIP.matcher(rawComponent)).matches()) {
+      }
+
+      matcher = RANGE_WITH_SKIP.matcher(rawComponent);
+      if (matcher.matches()) {
         final int lower = Integer.parseInt(matcher.group("lower"));
         final int upper = Integer.parseInt(matcher.group("upper"));
         final int skip = Integer.parseInt(matcher.group("skip"));
@@ -431,10 +439,10 @@ public final class CrontabEntry {
           rangeSet.add(Range.singleton(i).canonical(DiscreteDomain.integers()));
         }
         return rangeSet.build();
-      } else {
-        throw new IllegalArgumentException(
-            "Cron schedule component " + rawComponent + " does not match any known patterns.");
       }
+
+      throw new IllegalArgumentException(
+          "Cron schedule component " + rawComponent + " does not match any known patterns.");
     }
 
     private RangeSet<Integer> parseMinute() {

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b2070885/src/main/java/org/apache/aurora/scheduler/state/MaintenanceController.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/state/MaintenanceController.java b/src/main/java/org/apache/aurora/scheduler/state/MaintenanceController.java
index 155fdd1..b34210c 100644
--- a/src/main/java/org/apache/aurora/scheduler/state/MaintenanceController.java
+++ b/src/main/java/org/apache/aurora/scheduler/state/MaintenanceController.java
@@ -146,7 +146,7 @@ public interface MaintenanceController {
     }
 
     /**
-     * Notifies the MaintenanceController that a task has changed state
+     * Notifies the MaintenanceController that a task has changed state.
      *
      * @param change Event
      */

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b2070885/src/main/java/org/apache/aurora/scheduler/state/SchedulerCoreImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/state/SchedulerCoreImpl.java b/src/main/java/org/apache/aurora/scheduler/state/SchedulerCoreImpl.java
index fa52c33..8560bd1 100644
--- a/src/main/java/org/apache/aurora/scheduler/state/SchedulerCoreImpl.java
+++ b/src/main/java/org/apache/aurora/scheduler/state/SchedulerCoreImpl.java
@@ -15,7 +15,6 @@
  */
 package org.apache.aurora.scheduler.state;
 
-
 import java.util.Set;
 import java.util.logging.Logger;
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b2070885/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java b/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java
index 71b3880..88bd20d 100644
--- a/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java
+++ b/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java
@@ -679,7 +679,6 @@ class SchedulerThriftInterface implements AuroraAdmin.Iface {
     return okResponse(Result.getQuotaResult(result));
   }
 
-
   @Requires(whitelist = Capability.PROVISIONER)
   @Override
   public Response setQuota(

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b2070885/src/test/java/org/apache/aurora/scheduler/async/TaskSchedulerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/async/TaskSchedulerTest.java b/src/test/java/org/apache/aurora/scheduler/async/TaskSchedulerTest.java
index bf1391e..c5ce965 100644
--- a/src/test/java/org/apache/aurora/scheduler/async/TaskSchedulerTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/async/TaskSchedulerTest.java
@@ -233,7 +233,6 @@ public class TaskSchedulerTest extends EasyMockTest {
                 .setEnvironment("env-" + taskId))));
   }
 
-
   private IScheduledTask makeTask(String taskId, ScheduleStatus status) {
     return IScheduledTask.build(makeTask(taskId).newBuilder().setStatus(status));
   }

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b2070885/src/test/java/org/apache/aurora/scheduler/configuration/ConfigurationManagerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/configuration/ConfigurationManagerTest.java b/src/test/java/org/apache/aurora/scheduler/configuration/ConfigurationManagerTest.java
index 05e80e8..8bf0ab4 100644
--- a/src/test/java/org/apache/aurora/scheduler/configuration/ConfigurationManagerTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/configuration/ConfigurationManagerTest.java
@@ -78,7 +78,6 @@ public class ConfigurationManagerTest {
           .setRole("owner-role")
           .setUser("owner-user"));
 
-
   @Test
   public void testIsGoodIdentifier() {
     for (String identifier : VALID_IDENTIFIERS) {

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b2070885/src/test/java/org/apache/aurora/scheduler/state/TaskAssignerImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/state/TaskAssignerImplTest.java b/src/test/java/org/apache/aurora/scheduler/state/TaskAssignerImplTest.java
index b4aeaf2..f84346d 100644
--- a/src/test/java/org/apache/aurora/scheduler/state/TaskAssignerImplTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/state/TaskAssignerImplTest.java
@@ -115,7 +115,6 @@ public class TaskAssignerImplTest extends EasyMockTest {
     assertEquals(Optional.of(TASK_INFO), assigner.maybeAssign(OFFER, TASK, emptyJob));
   }
 
-
   @Test
   public void testAssignVetoes() {
     expect(filter.filter(

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b2070885/src/test/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImplTest.java b/src/test/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImplTest.java
index b985fbb..488df66 100644
--- a/src/test/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImplTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImplTest.java
@@ -86,7 +86,6 @@ public class SnapshotStoreImplTest extends EasyMockTest {
         .setFrameworkId(frameworkId)
         .setVersion(CURRENT_API_VERSION);
 
-
     storageUtil.expectOperations();
     expect(storageUtil.taskStore.fetchTasks(Query.unscoped())).andReturn(tasks);
     expect(storageUtil.quotaStore.fetchQuotas())

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b2070885/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java
index 4ed655d..a9e5d89 100644
--- a/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java
@@ -755,7 +755,6 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest {
         thrift.descheduleCronJob(CRON_JOB.getKey(), DEFAULT_LOCK, SESSION));
   }
 
-
   @Test
   public void testRewriteShardTaskMissing() throws Exception {
     InstanceKey instance = new InstanceKey(JobKeys.from("foo", "bar", "baz").newBuilder(), 0);