Skip to content

Commit

Permalink
Ensure that Struts interceptors are populated even if they are create…
Browse files Browse the repository at this point in the history
…d after the injector, github google#1075

Closes google#1081

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=152278067
  • Loading branch information
ThrawnCA authored and ronshapiro committed Apr 6, 2017
1 parent 0d2a5d1 commit 4c59c05
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ public Interceptor buildInterceptor(InterceptorConfig interceptorConfig, Map int
ProvidedInterceptor providedInterceptor =
new ProvidedInterceptor(interceptorConfig, interceptorRefParams, interceptorClass);
interceptors.add(providedInterceptor);
if (strutsInjector != null) {
synchronized (this) {
if (strutsInjector != null) {
providedInterceptor.inject();
}
}
}
return providedInterceptor;
}

Expand Down

0 comments on commit 4c59c05

Please sign in to comment.