ef-labs / vertx-guice

Create Vert.x Modules and Verticles with dependency injection using Guice
MIT License
59 stars 24 forks source link

Support Promise variants of start and stop methods #18

Open jhwarner opened 5 years ago

jhwarner commented 5 years ago

When creating a verticle that overrides the Verticle#start(Promise<Void) method, this module doesn't work correctly and fails to call start.

This is because GuiceVerticleLoader has no implementation of the promise method, which means execution falls to the default method in the Verticle interface. This eventually leads to the GuiceVerticleLoader attempting to call the real verticle's #start(Future<Void> method, rather than the Promise one.

So added the start(Promise<Void>) implementation to GuiceVerticleLoader and created a new test for it.