Skip to content

Commit

Permalink
Merge pull request #153 from SDCISA-13736-FixBadHabitsIn-RestStorageMod
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddenalpha authored Jan 3, 2024
2 parents fa9d494 + 0146992 commit 8120057
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/main/java/org/swisspush/reststorage/RestStorageMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ public class RestStorageMod extends AbstractVerticle {

private RedisProvider redisProvider;

public RestStorageMod() {
}
public RestStorageMod() {}

public RestStorageMod(RedisProvider redisProvider) {
this.redisProvider = redisProvider;
Expand All @@ -42,7 +41,7 @@ public void start(Promise<Void> promise) {
new EventBusAdapter().init(vertx, modConfig.getStorageAddress(), handler);
promise.complete();
} else {
promise.fail(result.cause());
promise.fail(new Exception(result.cause()));
}
});
} else {
Expand All @@ -65,7 +64,7 @@ private Future<Storage> createStorage(ModuleConfiguration moduleConfiguration) {
if(event.succeeded()){
promise.complete(event.result());
} else {
promise.fail(event.cause());
promise.fail(new Exception(event.cause()));
}
});
break;
Expand All @@ -87,7 +86,7 @@ private Future<RedisStorage> createRedisStorage(Vertx vertx, ModuleConfiguration
if(event.succeeded()) {
initPromise.complete(new RedisStorage(vertx, moduleConfiguration, redisProvider));
} else {
initPromise.fail(event.cause());
initPromise.fail(new Exception(event.cause()));
}
});

Expand Down

0 comments on commit 8120057

Please sign in to comment.