Skip to content

Commit 5bb9eca

Browse files
committed
添加初始化检查
1 parent a60cc43 commit 5bb9eca

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

AndroidExecLibrary/src/main/java/com/excellence/exec/CommandTask.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ public Builder timeDelay(long timeDelay) {
127127
}
128128

129129
public CommandTask build() {
130+
Commander.checkCommander();
130131
return new CommandTask(this);
131132
}
132133
}

AndroidExecLibrary/src/main/java/com/excellence/exec/Commander.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static void destroy() {
8282
mInstance.mCommand.clearAll();
8383
}
8484

85-
private static void checkCommander() {
85+
protected static void checkCommander() {
8686
if (mInstance == null) {
8787
throw new RuntimeException("Commander not initialized!!!");
8888
}

0 commit comments

Comments
 (0)