Skip to content

Commit b492052

Browse files
author
Igor Polevoy
committed
#239 Injector should not be set in case of testing
1 parent d6bd9b9 commit b492052

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

activeweb/src/main/java/org/javalite/activeweb/RequestDispatcher.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package org.javalite.activeweb;
1717

18+
import com.google.inject.Injector;
1819
import org.javalite.activejdbc.DB;
1920
import org.javalite.common.Util;
2021
import org.slf4j.Logger;
@@ -132,9 +133,7 @@ private void initAppConfig(String configClassName, AppContext context, boolean f
132133
if(appConfig instanceof Bootstrap){
133134
appBootstrap = (Bootstrap) appConfig;
134135
if(!Configuration.isTesting() ){
135-
if(appBootstrap.getInjector() != null){
136-
Context.getControllerRegistry().setInjector(appBootstrap.getInjector());
137-
}
136+
Context.getControllerRegistry().setInjector(appBootstrap.getInjector());
138137
}
139138
}
140139
appConfig.completeInit();

0 commit comments

Comments
 (0)