Skip to content

Commit 2db7c99

Browse files
author
Igor Polevoy
committed
#239 Injector should not be set in case of testing
1 parent 259f26c commit 2db7c99

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ private void initAppConfig(String configClassName, AppContext context, boolean f
129129
try {
130130
Class c = Class.forName(configClassName);
131131
appConfig = (AppConfig) c.newInstance();
132-
appConfig.init(context);
132+
133133
if(appConfig instanceof Bootstrap){
134134
appBootstrap = (Bootstrap) appConfig;
135-
Injector injector = appBootstrap.getInjector();
136135
if(!Configuration.isTesting() ){
136+
Injector injector = appBootstrap.getInjector();
137137
if(Context.getControllerRegistry().getInjector() != null && injector != null){
138138
throw new InitException("Either use setInjector() or getInjector(), but not both...");
139139
}

0 commit comments

Comments
 (0)