Skip to content

Commit b8f086b

Browse files
authored
handle if null init callback (#45)
1 parent 63e8e94 commit b8f086b

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

Diff for: eppo/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
}
55

66
group = "cloud.eppo"
7-
version = "1.0.6"
7+
version = "1.0.7"
88

99
android {
1010
compileSdk 33

Diff for: eppo/src/androidTest/java/cloud/eppo/android/EppoClientTest.java

+1
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ public void onError(String errorMessage) {
167167
})
168168
.buildAndInit();
169169

170+
// Wait for initialization to succeed or fail, up to 10 seconds, before continuing
170171
try {
171172
if (!lock.await(10000, TimeUnit.MILLISECONDS)) {
172173
throw new InterruptedException("Request for RAC did not complete within timeout");

Diff for: eppo/src/main/java/cloud/eppo/android/ConfigurationRequestor.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ public void load(InitializationCallback callback) {
2929
@Override
3030
public void onCacheLoadSuccess() {
3131
cachedUsed.set(true);
32-
callback.onCompleted();
32+
if (callback != null) {
33+
callback.onCompleted();
34+
}
3335
}
3436

3537
@Override

0 commit comments

Comments
 (0)