Fix LookupSerdeModule double-binding in Coordinator-as-Overlord mode. (#7765)

Fixes #7762.
This commit is contained in:
Gian Merlino 2019-05-26 15:14:50 -07:00 committed by GitHub
parent c97eb93e16
commit cf09fbf4ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -272,10 +272,12 @@ public class CliCoordinator extends ServerRunnable
} }
); );
modules.add(new LookupSerdeModule());
if (beOverlord) { if (beOverlord) {
modules.addAll(new CliOverlord().getModules(false)); modules.addAll(new CliOverlord().getModules(false));
} else {
// Only add LookupSerdeModule if !beOverlord, since CliOverlord includes it, and having two copies causes
// the injector to get confused due to having multiple bindings for the same classes.
modules.add(new LookupSerdeModule());
} }
return modules; return modules;