Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

Commit

Permalink
#7 executable을 runnable로 대체
Browse files Browse the repository at this point in the history
  • Loading branch information
JSpiner committed Oct 16, 2018
1 parent d874308 commit baf1525
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
7 changes: 0 additions & 7 deletions src/main/java/executor/Executable.java

This file was deleted.

8 changes: 4 additions & 4 deletions src/main/java/executor/SafeExecutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ public static SafeExecutorBuilder build() {

public static final class SafeExecutorBuilder {

private ArrayList<Executable> executableList;
private ArrayList<Runnable> executableList;
private ErrorListener errorListener;
private boolean ignore;

private SafeExecutorBuilder() {
executableList = new ArrayList<>();
}

public SafeExecutorBuilder add(Executable executable) {
public SafeExecutorBuilder add(Runnable executable) {
executableList.add(executable);
return this;
}
Expand All @@ -39,9 +39,9 @@ public SafeExecutorBuilder ignore() {
}

public void run() {
for (Executable executable : executableList) {
for (Runnable executable : executableList) {
try {
executable.execute();
executable.run();
} catch (Exception error) {
if (!ignore) {
executeError(error);
Expand Down

0 comments on commit baf1525

Please sign in to comment.