Resolves checkstyle errors for callback, chain, circuit-breaker (#1060)

* Reduces checkstyle errors in callback

* Reduces checkstyle errors in chain

* Reduces checkstyle errors in circuit-breaker
This commit is contained in:
Anurag Agarwal
2019-11-10 00:57:14 +05:30
committed by Ilkka Seppälä
parent efc17fcc70
commit 31f27a720b
18 changed files with 114 additions and 125 deletions

View File

@ -23,16 +23,14 @@
package com.iluwatar.callback;
import org.slf4j.Logger;
import static org.slf4j.LoggerFactory.getLogger;
import org.slf4j.Logger;
/**
*
* Callback pattern is more native for functional languages where functions are
* treated as first-class citizens. Prior to Java 8 callbacks can be simulated
* using simple (alike command) interfaces.
*
* Callback pattern is more native for functional languages where functions are treated as
* first-class citizens. Prior to Java 8 callbacks can be simulated using simple (alike command)
* interfaces.
*/
public final class App {
@ -42,7 +40,7 @@ public final class App {
}
/**
* Program entry point
* Program entry point.
*/
public static void main(final String[] args) {
Task task = new SimpleTask();

View File

@ -24,9 +24,7 @@
package com.iluwatar.callback;
/**
*
* Callback interface
*
* Callback interface.
*/
public interface Callback {

View File

@ -23,24 +23,23 @@
package com.iluwatar.callback;
import org.slf4j.Logger;
import static org.slf4j.LoggerFactory.getLogger;
import org.slf4j.Logger;
/**
*
* This example generates the exact same output as {@link App} however the
* callback has been defined as a Lambdas expression.
*
* This example generates the exact same output as {@link App} however the callback has been defined
* as a Lambdas expression.
*/
public final class LambdasApp {
private static final Logger LOGGER = getLogger(LambdasApp.class);
private LambdasApp() { }
private LambdasApp() {
}
/**
* Program entry point
* Program entry point.
*/
public static void main(final String[] args) {
Task task = new SimpleTask();

View File

@ -23,14 +23,12 @@
package com.iluwatar.callback;
import org.slf4j.Logger;
import static org.slf4j.LoggerFactory.getLogger;
import org.slf4j.Logger;
/**
*
* Implementation of task that need to be executed
*
* Implementation of task that need to be executed.
*/
public final class SimpleTask extends Task {
@ -39,6 +37,6 @@ public final class SimpleTask extends Task {
@Override
public void execute() {
LOGGER.info("Perform some important activity and after call the"
+ " callback method.");
+ " callback method.");
}
}

View File

@ -24,14 +24,12 @@
package com.iluwatar.callback;
/**
*
* Template-method class for callback hook execution
*
* Template-method class for callback hook execution.
*/
public abstract class Task {
/**
* Execute with callback
* Execute with callback.
*/
final void executeWith(final Callback callback) {
execute();