|
|
@@ -38,15 +38,21 @@ public abstract class InterceptorStack implements Interceptor {
|
|
|
interList = null;
|
|
|
}
|
|
|
|
|
|
- protected final InterceptorStack addInterceptors(Interceptor... interceptors) {
|
|
|
- if (interceptors == null || interceptors.length == 0)
|
|
|
+ protected InterceptorStack addInterceptors(Interceptor... interceptors) {
|
|
|
+ if (interceptors == null || interceptors.length == 0) {
|
|
|
throw new IllegalArgumentException("Interceptors can not be null");
|
|
|
+ }
|
|
|
|
|
|
- if (interList == null)
|
|
|
+ if (interList == null) {
|
|
|
interList = new ArrayList<Interceptor>();
|
|
|
+ }
|
|
|
|
|
|
- for (Interceptor ref : interceptors)
|
|
|
+ for (Interceptor ref : interceptors) {
|
|
|
+ if (AopManager.me().isInjectDependency()) {
|
|
|
+ Aop.inject(ref);
|
|
|
+ }
|
|
|
interList.add(ref);
|
|
|
+ }
|
|
|
|
|
|
return this;
|
|
|
}
|