From 561cd6dc86246c1bd4a7a156af6cdc9a5f044567 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sun, 16 Jun 2013 22:25:58 +0300 Subject: [PATCH] Do some PMD-driven cleanups --- .pmd | 816 +++++++++--------- src/ro/ieval/fonbot/ExecutableRunnable.java | 28 +- .../fonbot/HttpCallExecutableRunnable.java | 6 +- src/ro/ieval/fonbot/PollResultCallback.java | 3 +- 4 files changed, 414 insertions(+), 439 deletions(-) diff --git a/.pmd b/.pmd index 5d5f745..d51ca6c 100644 --- a/.pmd +++ b/.pmd @@ -4,228 +4,256 @@ .ruleset - LooseCoupling - Type Resolution Rules + AbstractClassWithoutAbstractMethod + Design Rules - CloneMethodMustImplementCloneable - Type Resolution Rules + AbstractClassWithoutAnyMethod + Design Rules - SignatureDeclareThrowsException - Type Resolution Rules + AccessorClassGeneration + Design Rules - UseSingleton - Design Rules + AddEmptyString + Optimization Rules - SimplifyBooleanReturns - Design Rules + AppendCharacterWithChar + String and StringBuffer Rules - SimplifyBooleanExpressions - Design Rules + ArrayIsStoredDirectly + Security Code Guidelines - AvoidDeeplyNestedIfStmts - Design Rules + AssignmentInOperand + Controversial Rules - AvoidReassigningParameters + AssignmentToNonFinalStatic Design Rules - SwitchDensity - Design Rules + AtLeastOneConstructor + Controversial Rules - ConstructorCallsOverridableMethod - Design Rules + AvoidAccessibilityAlteration + Controversial Rules - AccessorClassGeneration - Design Rules + AvoidArrayLoops + Optimization Rules - FinalFieldCouldBeStatic - Design Rules + AvoidAssertAsIdentifier + Migration Rules - CloseResource - Design Rules + AvoidCallingFinalize + Finalizer Rules - NonStaticInitializer - Design Rules + AvoidCatchingNPE + Strict Exception Rules - DefaultLabelNotLastInSwitchStmt - Design Rules + AvoidCatchingThrowable + Strict Exception Rules - NonCaseLabelInSwitchStatement + AvoidConstantsInterface Design Rules - OptimizableToArrayCall - Design Rules + AvoidDecimalLiteralsInBigDecimalConstructor + Basic Rules - BadComparison + AvoidDeeplyNestedIfStmts Design Rules - EqualsNull - Design Rules + AvoidDollarSigns + Naming Rules - ConfusingTernary - Design Rules + AvoidDuplicateLiterals + String and StringBuffer Rules - InstantiationToGetClass - Design Rules + AvoidEnumAsIdentifier + Migration Rules - IdempotentOperations - Design Rules + AvoidFieldNameMatchingMethodName + Naming Rules - SimpleDateFormatNeedsLocale - Design Rules + AvoidFieldNameMatchingTypeName + Naming Rules - ImmutableField + AvoidInstanceofChecksInCatchClause Design Rules - UseLocaleWithCaseConversions - Design Rules + AvoidMultipleUnaryOperators + Basic Rules + + + AvoidPrintStackTrace + Java Logging Rules AvoidProtectedFieldInFinalClass Design Rules - AssignmentToNonFinalStatic + AvoidReassigningParameters Design Rules - MissingStaticMethodInNonInstantiatableClass - Design Rules + AvoidRethrowingException + Strict Exception Rules + + + AvoidStringBufferField + String and StringBuffer Rules AvoidSynchronizedAtMethodLevel Design Rules - MissingBreakInSwitch - Design Rules + AvoidThreadGroup + Basic Rules - UseNotifyAllInsteadOfNotify - Design Rules + AvoidThrowingNewInstanceOfSameException + Strict Exception Rules - AvoidInstanceofChecksInCatchClause - Design Rules + AvoidThrowingNullPointerException + Strict Exception Rules - AbstractClassWithoutAbstractMethod - Design Rules + AvoidThrowingRawExceptionTypes + Strict Exception Rules - SimplifyConditional - Design Rules + AvoidUsingHardCodedIP + Basic Rules - CompareObjectsWithEquals - Design Rules + AvoidUsingNativeCode + Controversial Rules - PositionLiteralsFirstInComparisons - Design Rules + AvoidUsingOctalValues + Basic Rules - UnnecessaryLocalBeforeReturn - Design Rules + AvoidUsingShortType + Controversial Rules - NonThreadSafeSingleton + BadComparison Design Rules - UncommentedEmptyMethod - Design Rules + BigIntegerInstantiation + Basic Rules - UncommentedEmptyConstructor - Design Rules + BooleanGetMethodName + Naming Rules - AvoidConstantsInterface - Design Rules + BooleanInstantiation + Basic Rules - UnsynchronizedStaticDateFormatter - Design Rules + BooleanInversion + Controversial Rules - PreserveStackTrace - Design Rules + BrokenNullCheck + Basic Rules - UseCollectionIsEmpty - Design Rules + ByteInstantiation + Migration Rules + + + CallSuperInConstructor + Controversial Rules + + + CheckResultSet + Basic Rules + + + ClassCastExceptionWithToArray + Basic Rules + + + ClassNamingConventions + Naming Rules ClassWithOnlyPrivateConstructorsShouldBeFinal Design Rules - EmptyMethodInAbstractClassShouldBeAbstract - Design Rules + CloneMethodMustImplementCloneable + Type Resolution Rules - SingularField - Design Rules + CloneThrowsCloneNotSupportedException + Clone Implementation Rules - ReturnEmptyArrayRatherThanNull + CloseResource Design Rules - AbstractClassWithoutAnyMethod + CollapsibleIfStatements + Basic Rules + + + CompareObjectsWithEquals Design Rules - AvoidCatchingThrowable - Strict Exception Rules + ConfusingTernary + Design Rules - SignatureDeclareThrowsException - Type Resolution Rules + ConsecutiveLiteralAppends + String and StringBuffer Rules - ExceptionAsFlowControl - Strict Exception Rules + ConstructorCallsOverridableMethod + Design Rules - AvoidCatchingNPE - Strict Exception Rules + CouplingBetweenObjects + Coupling Rules - AvoidThrowingRawExceptionTypes - Strict Exception Rules + DefaultLabelNotLastInSwitchStmt + Design Rules - AvoidThrowingNullPointerException - Strict Exception Rules + DefaultPackage + Controversial Rules - AvoidRethrowingException - Strict Exception Rules + DoNotCallGarbageCollectionExplicitly + Controversial Rules DoNotExtendJavaLangError @@ -236,139 +264,159 @@ Strict Exception Rules - AvoidThrowingNewInstanceOfSameException - Strict Exception Rules + DontImportJavaLang + Import Statement Rules - UnusedPrivateField - Unused Code Rules + DontImportSun + Controversial Rules - UnusedLocalVariable - Unused Code Rules + DoubleCheckedLocking + Basic Rules - UnusedPrivateMethod - Unused Code Rules + DuplicateImports + Import Statement Rules - UnusedFormalParameter - Unused Code Rules + EmptyCatchBlock + Basic Rules - MoreThanOneLogger - Java Logging Rules + EmptyFinalizer + Finalizer Rules - LoggerIsNotStaticFinal - Java Logging Rules + EmptyFinallyBlock + Basic Rules - SystemPrintln - Java Logging Rules + EmptyIfStmt + Basic Rules - AvoidPrintStackTrace - Java Logging Rules + EmptyInitializer + Basic Rules - AvoidDuplicateLiterals - String and StringBuffer Rules + EmptyMethodInAbstractClassShouldBeAbstract + Design Rules - StringInstantiation - String and StringBuffer Rules + EmptyStatementNotInLoop + Basic Rules - StringToString - String and StringBuffer Rules + EmptyStaticInitializer + Basic Rules - InefficientStringBuffering - String and StringBuffer Rules + EmptySwitchStatements + Basic Rules - UnnecessaryCaseChange - String and StringBuffer Rules + EmptySynchronizedBlock + Basic Rules - UseStringBufferLength - String and StringBuffer Rules + EmptyTryBlock + Basic Rules - AppendCharacterWithChar - String and StringBuffer Rules + EmptyWhileStmt + Basic Rules - ConsecutiveLiteralAppends - String and StringBuffer Rules + EqualsNull + Design Rules - UseIndexOfChar - String and StringBuffer Rules + ExceptionAsFlowControl + Strict Exception Rules - InefficientEmptyStringCheck - String and StringBuffer Rules + ExcessiveClassLength + Code Size Rules - InsufficientStringBufferDeclaration - String and StringBuffer Rules + ExcessiveImports + Coupling Rules - UselessStringValueOf - String and StringBuffer Rules + ExcessiveMethodLength + Code Size Rules - StringBufferInstantiationWithChar - String and StringBuffer Rules + ExcessiveParameterList + Code Size Rules - UseEqualsToCompareStrings - String and StringBuffer Rules + ExcessivePublicCount + Code Size Rules - AvoidStringBufferField - String and StringBuffer Rules + FinalFieldCouldBeStatic + Design Rules - ReplaceVectorWithList - Migration Rules + FinalizeDoesNotCallSuperFinalize + Finalizer Rules - ReplaceHashtableWithMap - Migration Rules + FinalizeOnlyCallsSuperFinalize + Finalizer Rules - ReplaceEnumerationWithIterator - Migration Rules + FinalizeOverloaded + Finalizer Rules - AvoidEnumAsIdentifier - Migration Rules + FinalizeShouldBeProtected + Finalizer Rules - AvoidAssertAsIdentifier - Migration Rules + ForLoopShouldBeWhileLoop + Basic Rules - IntegerInstantiation - Migration Rules + IdempotentOperations + Design Rules - ByteInstantiation - Migration Rules + ImmutableField + Design Rules - ShortInstantiation - Migration Rules + ImportFromSamePackage + Import Statement Rules - LongInstantiation + InefficientEmptyStringCheck + String and StringBuffer Rules + + + InefficientStringBuffering + String and StringBuffer Rules + + + InstantiationToGetClass + Design Rules + + + InsufficientStringBufferDeclaration + String and StringBuffer Rules + + + IntegerInstantiation Migration Rules - JUnit4TestShouldUseBeforeAnnotation + JumbledIncrementer + Basic Rules + + + JUnit4SuitesShouldUseSuiteAnnotation Migration Rules @@ -376,472 +424,400 @@ Migration Rules - JUnit4TestShouldUseTestAnnotation + JUnit4TestShouldUseBeforeAnnotation Migration Rules - JUnit4SuitesShouldUseSuiteAnnotation + JUnit4TestShouldUseTestAnnotation Migration Rules - JUnitUseExpected - Migration Rules + JUnitAssertionsShouldIncludeMessage + JUnit Rules - LocalVariableCouldBeFinal - Optimization Rules + JUnitSpelling + JUnit Rules - MethodArgumentCouldBeFinal - Optimization Rules + JUnitStaticSuite + JUnit Rules - AvoidInstantiatingObjectsInLoops - Optimization Rules + JUnitTestsShouldIncludeAssert + JUnit Rules - UseArrayListInsteadOfVector - Optimization Rules + JUnitUseExpected + Migration Rules - SimplifyStartsWith + LocalVariableCouldBeFinal Optimization Rules - UseStringBufferForStringAppends - Optimization Rules + LoggerIsNotStaticFinal + Java Logging Rules - UseArraysAsList - Optimization Rules + LongInstantiation + Migration Rules - AvoidArrayLoops - Optimization Rules + LooseCoupling + Type Resolution Rules - UnnecessaryWrapperObjectCreation + MethodArgumentCouldBeFinal Optimization Rules - AddEmptyString - Optimization Rules + MethodNamingConventions + Naming Rules - EmptyCatchBlock - Basic Rules + MethodReturnsInternalArray + Security Code Guidelines - EmptyIfStmt - Basic Rules + MethodWithSameNameAsEnclosingClass + Naming Rules - EmptyWhileStmt - Basic Rules + MisleadingVariableName + Naming Rules - EmptyTryBlock + MisplacedNullCheck Basic Rules - EmptyFinallyBlock - Basic Rules + MissingBreakInSwitch + Design Rules - EmptySwitchStatements - Basic Rules + MissingSerialVersionUID + JavaBean Rules - JumbledIncrementer - Basic Rules + MissingStaticMethodInNonInstantiatableClass + Design Rules - ForLoopShouldBeWhileLoop - Basic Rules + MoreThanOneLogger + Java Logging Rules - UnnecessaryConversionTemporary - Basic Rules + NcssConstructorCount + Code Size Rules - OverrideBothEqualsAndHashcode - Basic Rules + NcssMethodCount + Code Size Rules - DoubleCheckedLocking - Basic Rules + NcssTypeCount + Code Size Rules - ReturnFromFinallyBlock - Basic Rules + NonCaseLabelInSwitchStatement + Design Rules - EmptySynchronizedBlock - Basic Rules + NonStaticInitializer + Design Rules - UnnecessaryReturn - Basic Rules + NonThreadSafeSingleton + Design Rules - EmptyStaticInitializer - Basic Rules + NoPackage + Naming Rules - UnconditionalIfStatement - Basic Rules + NullAssignment + Controversial Rules - EmptyStatementNotInLoop - Basic Rules + OptimizableToArrayCall + Design Rules - BooleanInstantiation + OverrideBothEqualsAndHashcode Basic Rules - UnnecessaryFinalModifier - Basic Rules + PackageCase + Naming Rules - CollapsibleIfStatements - Basic Rules + PositionLiteralsFirstInComparisons + Design Rules - UselessOverridingMethod - Basic Rules + PreserveStackTrace + Design Rules - ClassCastExceptionWithToArray - Basic Rules + ProperCloneImplementation + Clone Implementation Rules - AvoidDecimalLiteralsInBigDecimalConstructor - Basic Rules + ProperLogger + Jakarta Commons Logging Rules - UselessOperationOnImmutable - Basic Rules + ReplaceEnumerationWithIterator + Migration Rules - MisplacedNullCheck - Basic Rules + ReplaceHashtableWithMap + Migration Rules - UnusedNullCheckInEquals - Basic Rules + ReplaceVectorWithList + Migration Rules - AvoidThreadGroup - Basic Rules + ReturnEmptyArrayRatherThanNull + Design Rules - BrokenNullCheck + ReturnFromFinallyBlock Basic Rules - BigIntegerInstantiation - Basic Rules + ShortInstantiation + Migration Rules - AvoidUsingOctalValues - Basic Rules + ShortMethodName + Naming Rules - AvoidUsingHardCodedIP - Basic Rules + SignatureDeclareThrowsException + Type Resolution Rules - CheckResultSet - Basic Rules + SimpleDateFormatNeedsLocale + Design Rules - AvoidMultipleUnaryOperators - Basic Rules + SimplifyBooleanAssertion + JUnit Rules - EmptyInitializer - Basic Rules + SimplifyBooleanExpressions + Design Rules - MethodReturnsInternalArray - Security Code Guidelines + SimplifyBooleanReturns + Design Rules - ArrayIsStoredDirectly - Security Code Guidelines + SimplifyConditional + Design Rules - CouplingBetweenObjects - Coupling Rules + SimplifyStartsWith + Optimization Rules - ExcessiveImports - Coupling Rules + SingularField + Design Rules - LooseCoupling - Type Resolution Rules + StringBufferInstantiationWithChar + String and StringBuffer Rules - DuplicateImports - Import Statement Rules + StringInstantiation + String and StringBuffer Rules - DontImportJavaLang - Import Statement Rules + StringToString + String and StringBuffer Rules - ImportFromSamePackage - Import Statement Rules + SuspiciousConstantFieldName + Naming Rules - TooManyStaticImports - Import Statement Rules + SuspiciousEqualsMethodName + Naming Rules - JUnitStaticSuite - JUnit Rules + SuspiciousHashcodeMethodName + Naming Rules - JUnitSpelling - JUnit Rules + SuspiciousOctalEscape + Controversial Rules - JUnitAssertionsShouldIncludeMessage - JUnit Rules + SwitchDensity + Design Rules - JUnitTestsShouldIncludeAssert - JUnit Rules + SystemPrintln + Java Logging Rules TestClassWithoutTestCases JUnit Rules - UnnecessaryBooleanAssertion - JUnit Rules + TooManyStaticImports + Import Statement Rules - UseAssertEqualsInsteadOfAssertTrue - JUnit Rules + UncommentedEmptyConstructor + Design Rules - UseAssertSameInsteadOfAssertTrue - JUnit Rules + UncommentedEmptyMethod + Design Rules - UseAssertNullInsteadOfAssertTrue - JUnit Rules + UnconditionalIfStatement + Basic Rules - SimplifyBooleanAssertion + UnnecessaryBooleanAssertion JUnit Rules - UnnecessaryConstructor - Controversial Rules - - - NullAssignment - Controversial Rules - - - UnusedModifier - Controversial Rules - - - AssignmentInOperand - Controversial Rules + UnnecessaryCaseChange + String and StringBuffer Rules - AtLeastOneConstructor + UnnecessaryConstructor Controversial Rules - DontImportSun - Controversial Rules + UnnecessaryConversionTemporary + Basic Rules - SuspiciousOctalEscape - Controversial Rules + UnnecessaryFinalModifier + Basic Rules - CallSuperInConstructor - Controversial Rules + UnnecessaryLocalBeforeReturn + Design Rules UnnecessaryParentheses Controversial Rules - DefaultPackage - Controversial Rules - - - BooleanInversion - Controversial Rules + UnnecessaryReturn + Basic Rules - AvoidUsingShortType - Controversial Rules + UnnecessaryWrapperObjectCreation + Optimization Rules - AvoidUsingVolatile - Controversial Rules + UnsynchronizedStaticDateFormatter + Design Rules - AvoidUsingNativeCode - Controversial Rules + UnusedFormalParameter + Unused Code Rules - AvoidAccessibilityAlteration - Controversial Rules + UnusedLocalVariable + Unused Code Rules - DoNotCallGarbageCollectionExplicitly + UnusedModifier Controversial Rules - ShortMethodName - Naming Rules - - - VariableNamingConventions - Naming Rules - - - MethodNamingConventions - Naming Rules - - - ClassNamingConventions - Naming Rules - - - AbstractNaming - Naming Rules - - - AvoidDollarSigns - Naming Rules - - - MethodWithSameNameAsEnclosingClass - Naming Rules - - - SuspiciousHashcodeMethodName - Naming Rules - - - SuspiciousConstantFieldName - Naming Rules - - - SuspiciousEqualsMethodName - Naming Rules - - - AvoidFieldNameMatchingTypeName - Naming Rules - - - AvoidFieldNameMatchingMethodName - Naming Rules - - - NoPackage - Naming Rules - - - PackageCase - Naming Rules - - - MisleadingVariableName - Naming Rules + UnusedNullCheckInEquals + Basic Rules - BooleanGetMethodName - Naming Rules + UnusedPrivateField + Unused Code Rules - ExcessiveMethodLength - Code Size Rules + UnusedPrivateMethod + Unused Code Rules - ExcessiveParameterList - Code Size Rules + UseArrayListInsteadOfVector + Optimization Rules - ExcessiveClassLength - Code Size Rules + UseArraysAsList + Optimization Rules - ExcessivePublicCount - Code Size Rules + UseAssertEqualsInsteadOfAssertTrue + JUnit Rules - NcssMethodCount - Code Size Rules + UseAssertNullInsteadOfAssertTrue + JUnit Rules - NcssTypeCount - Code Size Rules + UseAssertSameInsteadOfAssertTrue + JUnit Rules - NcssConstructorCount - Code Size Rules + UseCollectionIsEmpty + Design Rules - EmptyFinalizer - Finalizer Rules + UseCorrectExceptionLogging + Jakarta Commons Logging Rules - FinalizeOnlyCallsSuperFinalize - Finalizer Rules + UseEqualsToCompareStrings + String and StringBuffer Rules - FinalizeOverloaded - Finalizer Rules + UseIndexOfChar + String and StringBuffer Rules - FinalizeDoesNotCallSuperFinalize - Finalizer Rules + UselessOperationOnImmutable + Basic Rules - FinalizeShouldBeProtected - Finalizer Rules + UselessOverridingMethod + Basic Rules - AvoidCallingFinalize - Finalizer Rules + UselessStringValueOf + String and StringBuffer Rules - UseCorrectExceptionLogging - Jakarta Commons Logging Rules + UseLocaleWithCaseConversions + Design Rules - ProperLogger - Jakarta Commons Logging Rules + UseNotifyAllInsteadOfNotify + Design Rules - MissingSerialVersionUID - JavaBean Rules + UseSingleton + Design Rules - ProperCloneImplementation - Clone Implementation Rules + UseStringBufferForStringAppends + Optimization Rules - CloneThrowsCloneNotSupportedException - Clone Implementation Rules + UseStringBufferLength + String and StringBuffer Rules - CloneMethodMustImplementCloneable - Type Resolution Rules + VariableNamingConventions + Naming Rules false diff --git a/src/ro/ieval/fonbot/ExecutableRunnable.java b/src/ro/ieval/fonbot/ExecutableRunnable.java index 13addac..4011338 100644 --- a/src/ro/ieval/fonbot/ExecutableRunnable.java +++ b/src/ro/ieval/fonbot/ExecutableRunnable.java @@ -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 ExecutableRunnables that should be retried */ - private static final Queue retryPendingTasks = new LinkedList(); + private static final Queue RETRY_PENDING_TASKS = new LinkedList(); /** 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 ExecutableRunnable */ public final void execute(){ retryTasks(); - executor.execute(this); + EXECUTORS.execute(this); } /** Mark this ExecutableRunnable as needing to be retried later */ protected final void retry(){ - synchronized(retryPendingTasks){ - retryPendingTasks.add(this); + synchronized(RETRY_PENDING_TASKS){ + RETRY_PENDING_TASKS.add(this); } } } diff --git a/src/ro/ieval/fonbot/HttpCallExecutableRunnable.java b/src/ro/ieval/fonbot/HttpCallExecutableRunnable.java index b54a7ba..1f96b13 100644 --- a/src/ro/ieval/fonbot/HttpCallExecutableRunnable.java +++ b/src/ro/ieval/fonbot/HttpCallExecutableRunnable.java @@ -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); } /** diff --git a/src/ro/ieval/fonbot/PollResultCallback.java b/src/ro/ieval/fonbot/PollResultCallback.java index e75ffce..6be7479 100644 --- a/src/ro/ieval/fonbot/PollResultCallback.java +++ b/src/ro/ieval/fonbot/PollResultCallback.java @@ -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; -- 2.39.2