Closed GuiSim closed 7 years ago
@Inject private Configuration configuration = null;
The documentation mentions that providing a Configuration instance is optional but that is not the case. In order to declare an Inject as optional, you need to use @Inject(optional=true). It should also probably be @Nullable.
@Inject(optional=true)
@Nullable
See https://github.com/google/guice/wiki/Injections#optional-injections
If you agree, I'll do a pull request with a fix.
EDIT: The same seems true for Settings
Settings
Yes, thank you for the report. Happy to take a look at a PR.
The documentation mentions that providing a Configuration instance is optional but that is not the case. In order to declare an Inject as optional, you need to use
@Inject(optional=true)
. It should also probably be@Nullable
.See https://github.com/google/guice/wiki/Injections#optional-injections
If you agree, I'll do a pull request with a fix.
EDIT: The same seems true for
Settings