Skip to content

Commit d6bd9b9

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

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,10 @@ private void initAppConfig(String configClassName, AppContext context, boolean f
131131
appConfig.init(context);
132132
if(appConfig instanceof Bootstrap){
133133
appBootstrap = (Bootstrap) appConfig;
134-
if(!Configuration.isTesting() && appBootstrap.getInjector() != null){
135-
Context.getControllerRegistry().setInjector(appBootstrap.getInjector());
134+
if(!Configuration.isTesting() ){
135+
if(appBootstrap.getInjector() != null){
136+
Context.getControllerRegistry().setInjector(appBootstrap.getInjector());
137+
}
136138
}
137139
}
138140
appConfig.completeInit();

0 commit comments

Comments
 (0)