]> iEval git - fonbot.git/commitdiff
Do some PMD-driven cleanups
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 16 Jun 2013 19:25:58 +0000 (22:25 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 16 Jun 2013 19:25:58 +0000 (22:25 +0300)
.pmd
src/ro/ieval/fonbot/ExecutableRunnable.java
src/ro/ieval/fonbot/HttpCallExecutableRunnable.java
src/ro/ieval/fonbot/PollResultCallback.java

diff --git a/.pmd b/.pmd
index 5d5f745f54f2ed094c7f1fafef03f5fde593808c..d51ca6c1a06d65d6ee9d61d165c019585ede9da8 100644 (file)
--- a/.pmd
+++ b/.pmd
     <ruleSetFile>.ruleset</ruleSetFile>
     <rules>
         <rule>
-            <name>LooseCoupling</name>
-            <ruleset>Type Resolution Rules</ruleset>
+            <name>AbstractClassWithoutAbstractMethod</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>CloneMethodMustImplementCloneable</name>
-            <ruleset>Type Resolution Rules</ruleset>
+            <name>AbstractClassWithoutAnyMethod</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>SignatureDeclareThrowsException</name>
-            <ruleset>Type Resolution Rules</ruleset>
+            <name>AccessorClassGeneration</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>UseSingleton</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AddEmptyString</name>
+            <ruleset>Optimization Rules</ruleset>
         </rule>
         <rule>
-            <name>SimplifyBooleanReturns</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AppendCharacterWithChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>SimplifyBooleanExpressions</name>
-            <ruleset>Design Rules</ruleset>
+            <name>ArrayIsStoredDirectly</name>
+            <ruleset>Security Code Guidelines</ruleset>
         </rule>
         <rule>
-            <name>AvoidDeeplyNestedIfStmts</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AssignmentInOperand</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidReassigningParameters</name>
+            <name>AssignmentToNonFinalStatic</name>
             <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>SwitchDensity</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AtLeastOneConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>ConstructorCallsOverridableMethod</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidAccessibilityAlteration</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>AccessorClassGeneration</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidArrayLoops</name>
+            <ruleset>Optimization Rules</ruleset>
         </rule>
         <rule>
-            <name>FinalFieldCouldBeStatic</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidAssertAsIdentifier</name>
+            <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>CloseResource</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidCallingFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
         </rule>
         <rule>
-            <name>NonStaticInitializer</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidCatchingNPE</name>
+            <ruleset>Strict Exception Rules</ruleset>
         </rule>
         <rule>
-            <name>DefaultLabelNotLastInSwitchStmt</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidCatchingThrowable</name>
+            <ruleset>Strict Exception Rules</ruleset>
         </rule>
         <rule>
-            <name>NonCaseLabelInSwitchStatement</name>
+            <name>AvoidConstantsInterface</name>
             <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>OptimizableToArrayCall</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidDecimalLiteralsInBigDecimalConstructor</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>BadComparison</name>
+            <name>AvoidDeeplyNestedIfStmts</name>
             <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>EqualsNull</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidDollarSigns</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>ConfusingTernary</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidDuplicateLiterals</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>InstantiationToGetClass</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidEnumAsIdentifier</name>
+            <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>IdempotentOperations</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidFieldNameMatchingMethodName</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>SimpleDateFormatNeedsLocale</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidFieldNameMatchingTypeName</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>ImmutableField</name>
+            <name>AvoidInstanceofChecksInCatchClause</name>
             <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>UseLocaleWithCaseConversions</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidMultipleUnaryOperators</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidPrintStackTrace</name>
+            <ruleset>Java Logging Rules</ruleset>
         </rule>
         <rule>
             <name>AvoidProtectedFieldInFinalClass</name>
             <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>AssignmentToNonFinalStatic</name>
+            <name>AvoidReassigningParameters</name>
             <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>MissingStaticMethodInNonInstantiatableClass</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidRethrowingException</name>
+            <ruleset>Strict Exception Rules</ruleset>
+        </rule>
+        <rule>
+            <name>AvoidStringBufferField</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
             <name>AvoidSynchronizedAtMethodLevel</name>
             <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>MissingBreakInSwitch</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidThreadGroup</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>UseNotifyAllInsteadOfNotify</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidThrowingNewInstanceOfSameException</name>
+            <ruleset>Strict Exception Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidInstanceofChecksInCatchClause</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidThrowingNullPointerException</name>
+            <ruleset>Strict Exception Rules</ruleset>
         </rule>
         <rule>
-            <name>AbstractClassWithoutAbstractMethod</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidThrowingRawExceptionTypes</name>
+            <ruleset>Strict Exception Rules</ruleset>
         </rule>
         <rule>
-            <name>SimplifyConditional</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidUsingHardCodedIP</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>CompareObjectsWithEquals</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidUsingNativeCode</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>PositionLiteralsFirstInComparisons</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidUsingOctalValues</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>UnnecessaryLocalBeforeReturn</name>
-            <ruleset>Design Rules</ruleset>
+            <name>AvoidUsingShortType</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>NonThreadSafeSingleton</name>
+            <name>BadComparison</name>
             <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>UncommentedEmptyMethod</name>
-            <ruleset>Design Rules</ruleset>
+            <name>BigIntegerInstantiation</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>UncommentedEmptyConstructor</name>
-            <ruleset>Design Rules</ruleset>
+            <name>BooleanGetMethodName</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidConstantsInterface</name>
-            <ruleset>Design Rules</ruleset>
+            <name>BooleanInstantiation</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>UnsynchronizedStaticDateFormatter</name>
-            <ruleset>Design Rules</ruleset>
+            <name>BooleanInversion</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>PreserveStackTrace</name>
-            <ruleset>Design Rules</ruleset>
+            <name>BrokenNullCheck</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>UseCollectionIsEmpty</name>
-            <ruleset>Design Rules</ruleset>
+            <name>ByteInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CallSuperInConstructor</name>
+            <ruleset>Controversial Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CheckResultSet</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ClassCastExceptionWithToArray</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>ClassNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
             <name>ClassWithOnlyPrivateConstructorsShouldBeFinal</name>
             <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptyMethodInAbstractClassShouldBeAbstract</name>
-            <ruleset>Design Rules</ruleset>
+            <name>CloneMethodMustImplementCloneable</name>
+            <ruleset>Type Resolution Rules</ruleset>
         </rule>
         <rule>
-            <name>SingularField</name>
-            <ruleset>Design Rules</ruleset>
+            <name>CloneThrowsCloneNotSupportedException</name>
+            <ruleset>Clone Implementation Rules</ruleset>
         </rule>
         <rule>
-            <name>ReturnEmptyArrayRatherThanNull</name>
+            <name>CloseResource</name>
             <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>AbstractClassWithoutAnyMethod</name>
+            <name>CollapsibleIfStatements</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>CompareObjectsWithEquals</name>
             <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidCatchingThrowable</name>
-            <ruleset>Strict Exception Rules</ruleset>
+            <name>ConfusingTernary</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>SignatureDeclareThrowsException</name>
-            <ruleset>Type Resolution Rules</ruleset>
+            <name>ConsecutiveLiteralAppends</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>ExceptionAsFlowControl</name>
-            <ruleset>Strict Exception Rules</ruleset>
+            <name>ConstructorCallsOverridableMethod</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidCatchingNPE</name>
-            <ruleset>Strict Exception Rules</ruleset>
+            <name>CouplingBetweenObjects</name>
+            <ruleset>Coupling Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidThrowingRawExceptionTypes</name>
-            <ruleset>Strict Exception Rules</ruleset>
+            <name>DefaultLabelNotLastInSwitchStmt</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidThrowingNullPointerException</name>
-            <ruleset>Strict Exception Rules</ruleset>
+            <name>DefaultPackage</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidRethrowingException</name>
-            <ruleset>Strict Exception Rules</ruleset>
+            <name>DoNotCallGarbageCollectionExplicitly</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
             <name>DoNotExtendJavaLangError</name>
             <ruleset>Strict Exception Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidThrowingNewInstanceOfSameException</name>
-            <ruleset>Strict Exception Rules</ruleset>
+            <name>DontImportJavaLang</name>
+            <ruleset>Import Statement Rules</ruleset>
         </rule>
         <rule>
-            <name>UnusedPrivateField</name>
-            <ruleset>Unused Code Rules</ruleset>
+            <name>DontImportSun</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>UnusedLocalVariable</name>
-            <ruleset>Unused Code Rules</ruleset>
+            <name>DoubleCheckedLocking</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>UnusedPrivateMethod</name>
-            <ruleset>Unused Code Rules</ruleset>
+            <name>DuplicateImports</name>
+            <ruleset>Import Statement Rules</ruleset>
         </rule>
         <rule>
-            <name>UnusedFormalParameter</name>
-            <ruleset>Unused Code Rules</ruleset>
+            <name>EmptyCatchBlock</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>MoreThanOneLogger</name>
-            <ruleset>Java Logging Rules</ruleset>
+            <name>EmptyFinalizer</name>
+            <ruleset>Finalizer Rules</ruleset>
         </rule>
         <rule>
-            <name>LoggerIsNotStaticFinal</name>
-            <ruleset>Java Logging Rules</ruleset>
+            <name>EmptyFinallyBlock</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>SystemPrintln</name>
-            <ruleset>Java Logging Rules</ruleset>
+            <name>EmptyIfStmt</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidPrintStackTrace</name>
-            <ruleset>Java Logging Rules</ruleset>
+            <name>EmptyInitializer</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidDuplicateLiterals</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>EmptyMethodInAbstractClassShouldBeAbstract</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>StringInstantiation</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>EmptyStatementNotInLoop</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>StringToString</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>EmptyStaticInitializer</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>InefficientStringBuffering</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>EmptySwitchStatements</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>UnnecessaryCaseChange</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>EmptySynchronizedBlock</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>UseStringBufferLength</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>EmptyTryBlock</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>AppendCharacterWithChar</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>EmptyWhileStmt</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>ConsecutiveLiteralAppends</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>EqualsNull</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>UseIndexOfChar</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>ExceptionAsFlowControl</name>
+            <ruleset>Strict Exception Rules</ruleset>
         </rule>
         <rule>
-            <name>InefficientEmptyStringCheck</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>ExcessiveClassLength</name>
+            <ruleset>Code Size Rules</ruleset>
         </rule>
         <rule>
-            <name>InsufficientStringBufferDeclaration</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>ExcessiveImports</name>
+            <ruleset>Coupling Rules</ruleset>
         </rule>
         <rule>
-            <name>UselessStringValueOf</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>ExcessiveMethodLength</name>
+            <ruleset>Code Size Rules</ruleset>
         </rule>
         <rule>
-            <name>StringBufferInstantiationWithChar</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>ExcessiveParameterList</name>
+            <ruleset>Code Size Rules</ruleset>
         </rule>
         <rule>
-            <name>UseEqualsToCompareStrings</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>ExcessivePublicCount</name>
+            <ruleset>Code Size Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidStringBufferField</name>
-            <ruleset>String and StringBuffer Rules</ruleset>
+            <name>FinalFieldCouldBeStatic</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>ReplaceVectorWithList</name>
-            <ruleset>Migration Rules</ruleset>
+            <name>FinalizeDoesNotCallSuperFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
         </rule>
         <rule>
-            <name>ReplaceHashtableWithMap</name>
-            <ruleset>Migration Rules</ruleset>
+            <name>FinalizeOnlyCallsSuperFinalize</name>
+            <ruleset>Finalizer Rules</ruleset>
         </rule>
         <rule>
-            <name>ReplaceEnumerationWithIterator</name>
-            <ruleset>Migration Rules</ruleset>
+            <name>FinalizeOverloaded</name>
+            <ruleset>Finalizer Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidEnumAsIdentifier</name>
-            <ruleset>Migration Rules</ruleset>
+            <name>FinalizeShouldBeProtected</name>
+            <ruleset>Finalizer Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidAssertAsIdentifier</name>
-            <ruleset>Migration Rules</ruleset>
+            <name>ForLoopShouldBeWhileLoop</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>IntegerInstantiation</name>
-            <ruleset>Migration Rules</ruleset>
+            <name>IdempotentOperations</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>ByteInstantiation</name>
-            <ruleset>Migration Rules</ruleset>
+            <name>ImmutableField</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>ShortInstantiation</name>
-            <ruleset>Migration Rules</ruleset>
+            <name>ImportFromSamePackage</name>
+            <ruleset>Import Statement Rules</ruleset>
         </rule>
         <rule>
-            <name>LongInstantiation</name>
+            <name>InefficientEmptyStringCheck</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InefficientStringBuffering</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InstantiationToGetClass</name>
+            <ruleset>Design Rules</ruleset>
+        </rule>
+        <rule>
+            <name>InsufficientStringBufferDeclaration</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
+        </rule>
+        <rule>
+            <name>IntegerInstantiation</name>
             <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>JUnit4TestShouldUseBeforeAnnotation</name>
+            <name>JumbledIncrementer</name>
+            <ruleset>Basic Rules</ruleset>
+        </rule>
+        <rule>
+            <name>JUnit4SuitesShouldUseSuiteAnnotation</name>
             <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
             <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>JUnit4TestShouldUseTestAnnotation</name>
+            <name>JUnit4TestShouldUseBeforeAnnotation</name>
             <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>JUnit4SuitesShouldUseSuiteAnnotation</name>
+            <name>JUnit4TestShouldUseTestAnnotation</name>
             <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>JUnitUseExpected</name>
-            <ruleset>Migration Rules</ruleset>
+            <name>JUnitAssertionsShouldIncludeMessage</name>
+            <ruleset>JUnit Rules</ruleset>
         </rule>
         <rule>
-            <name>LocalVariableCouldBeFinal</name>
-            <ruleset>Optimization Rules</ruleset>
+            <name>JUnitSpelling</name>
+            <ruleset>JUnit Rules</ruleset>
         </rule>
         <rule>
-            <name>MethodArgumentCouldBeFinal</name>
-            <ruleset>Optimization Rules</ruleset>
+            <name>JUnitStaticSuite</name>
+            <ruleset>JUnit Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidInstantiatingObjectsInLoops</name>
-            <ruleset>Optimization Rules</ruleset>
+            <name>JUnitTestsShouldIncludeAssert</name>
+            <ruleset>JUnit Rules</ruleset>
         </rule>
         <rule>
-            <name>UseArrayListInsteadOfVector</name>
-            <ruleset>Optimization Rules</ruleset>
+            <name>JUnitUseExpected</name>
+            <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>SimplifyStartsWith</name>
+            <name>LocalVariableCouldBeFinal</name>
             <ruleset>Optimization Rules</ruleset>
         </rule>
         <rule>
-            <name>UseStringBufferForStringAppends</name>
-            <ruleset>Optimization Rules</ruleset>
+            <name>LoggerIsNotStaticFinal</name>
+            <ruleset>Java Logging Rules</ruleset>
         </rule>
         <rule>
-            <name>UseArraysAsList</name>
-            <ruleset>Optimization Rules</ruleset>
+            <name>LongInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidArrayLoops</name>
-            <ruleset>Optimization Rules</ruleset>
+            <name>LooseCoupling</name>
+            <ruleset>Type Resolution Rules</ruleset>
         </rule>
         <rule>
-            <name>UnnecessaryWrapperObjectCreation</name>
+            <name>MethodArgumentCouldBeFinal</name>
             <ruleset>Optimization Rules</ruleset>
         </rule>
         <rule>
-            <name>AddEmptyString</name>
-            <ruleset>Optimization Rules</ruleset>
+            <name>MethodNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptyCatchBlock</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>MethodReturnsInternalArray</name>
+            <ruleset>Security Code Guidelines</ruleset>
         </rule>
         <rule>
-            <name>EmptyIfStmt</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>MethodWithSameNameAsEnclosingClass</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptyWhileStmt</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>MisleadingVariableName</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptyTryBlock</name>
+            <name>MisplacedNullCheck</name>
             <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptyFinallyBlock</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>MissingBreakInSwitch</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptySwitchStatements</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>MissingSerialVersionUID</name>
+            <ruleset>JavaBean Rules</ruleset>
         </rule>
         <rule>
-            <name>JumbledIncrementer</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>MissingStaticMethodInNonInstantiatableClass</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>ForLoopShouldBeWhileLoop</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>MoreThanOneLogger</name>
+            <ruleset>Java Logging Rules</ruleset>
         </rule>
         <rule>
-            <name>UnnecessaryConversionTemporary</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>NcssConstructorCount</name>
+            <ruleset>Code Size Rules</ruleset>
         </rule>
         <rule>
-            <name>OverrideBothEqualsAndHashcode</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>NcssMethodCount</name>
+            <ruleset>Code Size Rules</ruleset>
         </rule>
         <rule>
-            <name>DoubleCheckedLocking</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>NcssTypeCount</name>
+            <ruleset>Code Size Rules</ruleset>
         </rule>
         <rule>
-            <name>ReturnFromFinallyBlock</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>NonCaseLabelInSwitchStatement</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptySynchronizedBlock</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>NonStaticInitializer</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>UnnecessaryReturn</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>NonThreadSafeSingleton</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptyStaticInitializer</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>NoPackage</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>UnconditionalIfStatement</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>NullAssignment</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptyStatementNotInLoop</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>OptimizableToArrayCall</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>BooleanInstantiation</name>
+            <name>OverrideBothEqualsAndHashcode</name>
             <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>UnnecessaryFinalModifier</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>PackageCase</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>CollapsibleIfStatements</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>PositionLiteralsFirstInComparisons</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>UselessOverridingMethod</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>PreserveStackTrace</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>ClassCastExceptionWithToArray</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>ProperCloneImplementation</name>
+            <ruleset>Clone Implementation Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidDecimalLiteralsInBigDecimalConstructor</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>ProperLogger</name>
+            <ruleset>Jakarta Commons Logging Rules</ruleset>
         </rule>
         <rule>
-            <name>UselessOperationOnImmutable</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>ReplaceEnumerationWithIterator</name>
+            <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>MisplacedNullCheck</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>ReplaceHashtableWithMap</name>
+            <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>UnusedNullCheckInEquals</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>ReplaceVectorWithList</name>
+            <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidThreadGroup</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>ReturnEmptyArrayRatherThanNull</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>BrokenNullCheck</name>
+            <name>ReturnFromFinallyBlock</name>
             <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>BigIntegerInstantiation</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>ShortInstantiation</name>
+            <ruleset>Migration Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidUsingOctalValues</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>ShortMethodName</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidUsingHardCodedIP</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>SignatureDeclareThrowsException</name>
+            <ruleset>Type Resolution Rules</ruleset>
         </rule>
         <rule>
-            <name>CheckResultSet</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>SimpleDateFormatNeedsLocale</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidMultipleUnaryOperators</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>SimplifyBooleanAssertion</name>
+            <ruleset>JUnit Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptyInitializer</name>
-            <ruleset>Basic Rules</ruleset>
+            <name>SimplifyBooleanExpressions</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>MethodReturnsInternalArray</name>
-            <ruleset>Security Code Guidelines</ruleset>
+            <name>SimplifyBooleanReturns</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>ArrayIsStoredDirectly</name>
-            <ruleset>Security Code Guidelines</ruleset>
+            <name>SimplifyConditional</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>CouplingBetweenObjects</name>
-            <ruleset>Coupling Rules</ruleset>
+            <name>SimplifyStartsWith</name>
+            <ruleset>Optimization Rules</ruleset>
         </rule>
         <rule>
-            <name>ExcessiveImports</name>
-            <ruleset>Coupling Rules</ruleset>
+            <name>SingularField</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>LooseCoupling</name>
-            <ruleset>Type Resolution Rules</ruleset>
+            <name>StringBufferInstantiationWithChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>DuplicateImports</name>
-            <ruleset>Import Statement Rules</ruleset>
+            <name>StringInstantiation</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>DontImportJavaLang</name>
-            <ruleset>Import Statement Rules</ruleset>
+            <name>StringToString</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>ImportFromSamePackage</name>
-            <ruleset>Import Statement Rules</ruleset>
+            <name>SuspiciousConstantFieldName</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>TooManyStaticImports</name>
-            <ruleset>Import Statement Rules</ruleset>
+            <name>SuspiciousEqualsMethodName</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>JUnitStaticSuite</name>
-            <ruleset>JUnit Rules</ruleset>
+            <name>SuspiciousHashcodeMethodName</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
         <rule>
-            <name>JUnitSpelling</name>
-            <ruleset>JUnit Rules</ruleset>
+            <name>SuspiciousOctalEscape</name>
+            <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>JUnitAssertionsShouldIncludeMessage</name>
-            <ruleset>JUnit Rules</ruleset>
+            <name>SwitchDensity</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>JUnitTestsShouldIncludeAssert</name>
-            <ruleset>JUnit Rules</ruleset>
+            <name>SystemPrintln</name>
+            <ruleset>Java Logging Rules</ruleset>
         </rule>
         <rule>
             <name>TestClassWithoutTestCases</name>
             <ruleset>JUnit Rules</ruleset>
         </rule>
         <rule>
-            <name>UnnecessaryBooleanAssertion</name>
-            <ruleset>JUnit Rules</ruleset>
+            <name>TooManyStaticImports</name>
+            <ruleset>Import Statement Rules</ruleset>
         </rule>
         <rule>
-            <name>UseAssertEqualsInsteadOfAssertTrue</name>
-            <ruleset>JUnit Rules</ruleset>
+            <name>UncommentedEmptyConstructor</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>UseAssertSameInsteadOfAssertTrue</name>
-            <ruleset>JUnit Rules</ruleset>
+            <name>UncommentedEmptyMethod</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>UseAssertNullInsteadOfAssertTrue</name>
-            <ruleset>JUnit Rules</ruleset>
+            <name>UnconditionalIfStatement</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>SimplifyBooleanAssertion</name>
+            <name>UnnecessaryBooleanAssertion</name>
             <ruleset>JUnit Rules</ruleset>
         </rule>
         <rule>
-            <name>UnnecessaryConstructor</name>
-            <ruleset>Controversial Rules</ruleset>
-        </rule>
-        <rule>
-            <name>NullAssignment</name>
-            <ruleset>Controversial Rules</ruleset>
-        </rule>
-        <rule>
-            <name>UnusedModifier</name>
-            <ruleset>Controversial Rules</ruleset>
-        </rule>
-        <rule>
-            <name>AssignmentInOperand</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>UnnecessaryCaseChange</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>AtLeastOneConstructor</name>
+            <name>UnnecessaryConstructor</name>
             <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>DontImportSun</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>UnnecessaryConversionTemporary</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>SuspiciousOctalEscape</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>UnnecessaryFinalModifier</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>CallSuperInConstructor</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>UnnecessaryLocalBeforeReturn</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
             <name>UnnecessaryParentheses</name>
             <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>DefaultPackage</name>
-            <ruleset>Controversial Rules</ruleset>
-        </rule>
-        <rule>
-            <name>BooleanInversion</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>UnnecessaryReturn</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidUsingShortType</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>UnnecessaryWrapperObjectCreation</name>
+            <ruleset>Optimization Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidUsingVolatile</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>UnsynchronizedStaticDateFormatter</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidUsingNativeCode</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>UnusedFormalParameter</name>
+            <ruleset>Unused Code Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidAccessibilityAlteration</name>
-            <ruleset>Controversial Rules</ruleset>
+            <name>UnusedLocalVariable</name>
+            <ruleset>Unused Code Rules</ruleset>
         </rule>
         <rule>
-            <name>DoNotCallGarbageCollectionExplicitly</name>
+            <name>UnusedModifier</name>
             <ruleset>Controversial Rules</ruleset>
         </rule>
         <rule>
-            <name>ShortMethodName</name>
-            <ruleset>Naming Rules</ruleset>
-        </rule>
-        <rule>
-            <name>VariableNamingConventions</name>
-            <ruleset>Naming Rules</ruleset>
-        </rule>
-        <rule>
-            <name>MethodNamingConventions</name>
-            <ruleset>Naming Rules</ruleset>
-        </rule>
-        <rule>
-            <name>ClassNamingConventions</name>
-            <ruleset>Naming Rules</ruleset>
-        </rule>
-        <rule>
-            <name>AbstractNaming</name>
-            <ruleset>Naming Rules</ruleset>
-        </rule>
-        <rule>
-            <name>AvoidDollarSigns</name>
-            <ruleset>Naming Rules</ruleset>
-        </rule>
-        <rule>
-            <name>MethodWithSameNameAsEnclosingClass</name>
-            <ruleset>Naming Rules</ruleset>
-        </rule>
-        <rule>
-            <name>SuspiciousHashcodeMethodName</name>
-            <ruleset>Naming Rules</ruleset>
-        </rule>
-        <rule>
-            <name>SuspiciousConstantFieldName</name>
-            <ruleset>Naming Rules</ruleset>
-        </rule>
-        <rule>
-            <name>SuspiciousEqualsMethodName</name>
-            <ruleset>Naming Rules</ruleset>
-        </rule>
-        <rule>
-            <name>AvoidFieldNameMatchingTypeName</name>
-            <ruleset>Naming Rules</ruleset>
-        </rule>
-        <rule>
-            <name>AvoidFieldNameMatchingMethodName</name>
-            <ruleset>Naming Rules</ruleset>
-        </rule>
-        <rule>
-            <name>NoPackage</name>
-            <ruleset>Naming Rules</ruleset>
-        </rule>
-        <rule>
-            <name>PackageCase</name>
-            <ruleset>Naming Rules</ruleset>
-        </rule>
-        <rule>
-            <name>MisleadingVariableName</name>
-            <ruleset>Naming Rules</ruleset>
+            <name>UnusedNullCheckInEquals</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>BooleanGetMethodName</name>
-            <ruleset>Naming Rules</ruleset>
+            <name>UnusedPrivateField</name>
+            <ruleset>Unused Code Rules</ruleset>
         </rule>
         <rule>
-            <name>ExcessiveMethodLength</name>
-            <ruleset>Code Size Rules</ruleset>
+            <name>UnusedPrivateMethod</name>
+            <ruleset>Unused Code Rules</ruleset>
         </rule>
         <rule>
-            <name>ExcessiveParameterList</name>
-            <ruleset>Code Size Rules</ruleset>
+            <name>UseArrayListInsteadOfVector</name>
+            <ruleset>Optimization Rules</ruleset>
         </rule>
         <rule>
-            <name>ExcessiveClassLength</name>
-            <ruleset>Code Size Rules</ruleset>
+            <name>UseArraysAsList</name>
+            <ruleset>Optimization Rules</ruleset>
         </rule>
         <rule>
-            <name>ExcessivePublicCount</name>
-            <ruleset>Code Size Rules</ruleset>
+            <name>UseAssertEqualsInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
         </rule>
         <rule>
-            <name>NcssMethodCount</name>
-            <ruleset>Code Size Rules</ruleset>
+            <name>UseAssertNullInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
         </rule>
         <rule>
-            <name>NcssTypeCount</name>
-            <ruleset>Code Size Rules</ruleset>
+            <name>UseAssertSameInsteadOfAssertTrue</name>
+            <ruleset>JUnit Rules</ruleset>
         </rule>
         <rule>
-            <name>NcssConstructorCount</name>
-            <ruleset>Code Size Rules</ruleset>
+            <name>UseCollectionIsEmpty</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>EmptyFinalizer</name>
-            <ruleset>Finalizer Rules</ruleset>
+            <name>UseCorrectExceptionLogging</name>
+            <ruleset>Jakarta Commons Logging Rules</ruleset>
         </rule>
         <rule>
-            <name>FinalizeOnlyCallsSuperFinalize</name>
-            <ruleset>Finalizer Rules</ruleset>
+            <name>UseEqualsToCompareStrings</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>FinalizeOverloaded</name>
-            <ruleset>Finalizer Rules</ruleset>
+            <name>UseIndexOfChar</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>FinalizeDoesNotCallSuperFinalize</name>
-            <ruleset>Finalizer Rules</ruleset>
+            <name>UselessOperationOnImmutable</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>FinalizeShouldBeProtected</name>
-            <ruleset>Finalizer Rules</ruleset>
+            <name>UselessOverridingMethod</name>
+            <ruleset>Basic Rules</ruleset>
         </rule>
         <rule>
-            <name>AvoidCallingFinalize</name>
-            <ruleset>Finalizer Rules</ruleset>
+            <name>UselessStringValueOf</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>UseCorrectExceptionLogging</name>
-            <ruleset>Jakarta Commons Logging Rules</ruleset>
+            <name>UseLocaleWithCaseConversions</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>ProperLogger</name>
-            <ruleset>Jakarta Commons Logging Rules</ruleset>
+            <name>UseNotifyAllInsteadOfNotify</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>MissingSerialVersionUID</name>
-            <ruleset>JavaBean Rules</ruleset>
+            <name>UseSingleton</name>
+            <ruleset>Design Rules</ruleset>
         </rule>
         <rule>
-            <name>ProperCloneImplementation</name>
-            <ruleset>Clone Implementation Rules</ruleset>
+            <name>UseStringBufferForStringAppends</name>
+            <ruleset>Optimization Rules</ruleset>
         </rule>
         <rule>
-            <name>CloneThrowsCloneNotSupportedException</name>
-            <ruleset>Clone Implementation Rules</ruleset>
+            <name>UseStringBufferLength</name>
+            <ruleset>String and StringBuffer Rules</ruleset>
         </rule>
         <rule>
-            <name>CloneMethodMustImplementCloneable</name>
-            <ruleset>Type Resolution Rules</ruleset>
+            <name>VariableNamingConventions</name>
+            <ruleset>Naming Rules</ruleset>
         </rule>
     </rules>
     <includeDerivedFiles>false</includeDerivedFiles>
index 13addac0a5a9e7bd238fcecc68189591f396b67f..4011338c4d2e9de175c50b3e1b3590f1e37a9db3 100644 (file)
@@ -41,33 +41,33 @@ import android.os.SystemClock;
  */
 abstract class ExecutableRunnable implements Runnable {
        /** Executor used to execute instances of this class */
-       private static final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
+       private static final ScheduledExecutorService EXECUTORS = Executors.newSingleThreadScheduledExecutor();
        /** Queue containing <code>ExecutableRunnable</code>s that should be retried */
-       private static final Queue<ExecutableRunnable> retryPendingTasks = new LinkedList<ExecutableRunnable>();
+       private static final Queue<ExecutableRunnable> RETRY_PENDING_TASKS = new LinkedList<ExecutableRunnable>();
        /** Minimum interval between task retries, in milliseconds */
-       private static final long retryInterval = 30000;
+       private static final long RETRY_INTERVAL = 30000;
        /** {@link SystemClock#elapsedRealtime()} time of last successful call to {@link #retryTasks()} */
        private static long lastRetry = 0;
-       /** True if a retryTasks run is already scheduled on {@link #executor} */
+       /** True if a retryTasks run is already scheduled on {@link #EXECUTORS} */
        private static volatile boolean retryIsScheduled = false;
 
        /** Run all tasks that should be retried */
        public static final void retryTasks(){
-               if(!retryIsScheduled && lastRetry+retryInterval>SystemClock.elapsedRealtime()){
+               if(!retryIsScheduled && lastRetry+RETRY_INTERVAL>SystemClock.elapsedRealtime()){
                        retryIsScheduled = true;
-                       executor.schedule(new Runnable() {
+                       EXECUTORS.schedule(new Runnable() {
                                @Override
                                public void run() {
                                        retryTasks();
                                        retryIsScheduled = false;
                                }
-                       }, retryInterval, TimeUnit.MILLISECONDS);
+                       }, RETRY_INTERVAL, TimeUnit.MILLISECONDS);
                        return;
                }
-               synchronized(retryPendingTasks){
-                       for(ExecutableRunnable task : retryPendingTasks)
-                               executor.execute(task);
-                       retryPendingTasks.clear();
+               synchronized(RETRY_PENDING_TASKS){
+                       for(ExecutableRunnable task : RETRY_PENDING_TASKS)
+                               EXECUTORS.execute(task);
+                       RETRY_PENDING_TASKS.clear();
                }
                lastRetry=SystemClock.elapsedRealtime();
        }
@@ -75,13 +75,13 @@ abstract class ExecutableRunnable implements Runnable {
        /** Execute this <code>ExecutableRunnable</code> */
        public final void execute(){
                retryTasks();
-               executor.execute(this);
+               EXECUTORS.execute(this);
        }
 
        /** Mark this <code>ExecutableRunnable</code> as needing to be retried later */
        protected final void retry(){
-               synchronized(retryPendingTasks){
-                       retryPendingTasks.add(this);
+               synchronized(RETRY_PENDING_TASKS){
+                       RETRY_PENDING_TASKS.add(this);
                }
        }
 }
index b54a7ba53affb7325f7c8d9c312cf703e3d1db51..1f96b1322c038679869f7c00a03da47c395a9457 100644 (file)
@@ -49,7 +49,7 @@ public final class HttpCallExecutableRunnable extends ExecutableRunnable{
         *
         * @author Marius Gavrilescu
         */
-       public static interface ResultCallback{
+       public interface ResultCallback{
                /**
                 * Callback invoked if the HTTP call is successful.
                 *
@@ -57,13 +57,13 @@ public final class HttpCallExecutableRunnable extends ExecutableRunnable{
                 * @param responseMessage HTTP response message
                 * @param inputStream HTTP content InputStream
                 */
-               public void onResult(final int responseCode, final String responseMessage, final InputStream inputStream);
+               void onResult(final int responseCode, final String responseMessage, final InputStream inputStream);
                /**
                 * Callback invoked if the HTTP call is unsuccessful.
                 *
                 * @param error localized error message
                 */
-               public void onError(final String error);
+               void onError(final String error);
        }
 
        /**
index e75ffce2f3548f4c541a83e17790c605cd8453b0..6be7479a0031a0441886dc35fdd8a0a1d15be156 100644 (file)
@@ -53,8 +53,7 @@ final class PollResultCallback implements ResultCallback {
        }
 
        @Override
-       public void onResult(int responseCode, String responseMessage,
-                       InputStream inputStream) {
+       public void onResult(final int responseCode, final String responseMessage, final InputStream inputStream) {
                if(responseCode!=200)
                        return;
 
This page took 0.09012 seconds and 4 git commands to generate.