Use consistent stage for the two-stage injection

This commit is contained in:
Andrew Gaul 2014-07-07 23:36:53 -07:00
parent 3fdb6d2e91
commit 66307d9816
1 changed files with 3 additions and 1 deletions

View File

@ -150,6 +150,8 @@ import com.google.inject.TypeLiteral;
*/
public class ContextBuilder {
private static final Stage GUICE_STAGE = Stage.PRODUCTION;
/**
* looks up a provider or api with the given id
*
@ -379,7 +381,7 @@ public class ContextBuilder {
private Properties expandProperties(final Properties resolved) {
return Guice.createInjector(new BindPropertiesToExpandedValues(resolved)).getInstance(Properties.class);
return Guice.createInjector(GUICE_STAGE, new BindPropertiesToExpandedValues(resolved)).getInstance(Properties.class);
}
public static Injector buildInjector(String name, ProviderMetadata providerMetadata, Supplier<Credentials> creds, List<Module> inputModules) {