diff --git a/akka-typed-actor/src/main/java/akka/config/TypedActorGuiceModule.java b/akka-typed-actor/src/main/java/akka/config/TypedActorGuiceModule.java index 8c370a8218..2452eeb706 100644 --- a/akka-typed-actor/src/main/java/akka/config/TypedActorGuiceModule.java +++ b/akka-typed-actor/src/main/java/akka/config/TypedActorGuiceModule.java @@ -26,7 +26,10 @@ public class TypedActorGuiceModule extends AbstractModule { final DependencyBinding db = bindings.get(i); //if (db.getInterface() ne null) bind((Class) db.getInterface()).to((Class) db.getTarget()).in(Singleton.class); //else - this.bind(db.getInterface()).toInstance(db.getTarget()); + + @SuppressWarnings("unchecked") + Class intf = db.getInterface(); + this.bind(intf).toInstance(db.getTarget()); } } }