Skip to content

Commit

Permalink
Merge pull request #1858 from allenxiang/master
Browse files Browse the repository at this point in the history
#1857 Filter out disabled interceptors from default interceptor list in AnnotationUtil
  • Loading branch information
jfarcand committed Feb 15, 2015
2 parents 06940ae + 1c2315e commit 577ae00
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,13 @@ public static void defaultInterceptors(AtmosphereFramework framework, List<Atmos
}

public static void interceptors(AtmosphereFramework framework, Class<? extends AtmosphereInterceptor>[] interceptors, List<AtmosphereInterceptor> l) {
for (Class i : interceptors) {
try {
l.add(framework.newClassInstance(AtmosphereInterceptor.class, i));
} catch (Throwable e) {
logger.warn("", e);
for (Class<? extends AtmosphereInterceptor> i : interceptors) {
if (!framework.excludedInterceptors().contains(i.getName())){
try {
l.add(framework.newClassInstance(AtmosphereInterceptor.class, i));
} catch (Throwable e) {
logger.warn("", e);
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,7 @@ protected void configureAtmosphereInterceptor(ServletConfig sc) {
}
}

logger.info("Set {} to disable them.", ApplicationConfig.DISABLE_ATMOSPHEREINTERCEPTOR, interceptors);
logger.info("Set {} to disable them.", ApplicationConfig.DISABLE_ATMOSPHEREINTERCEPTOR);
}
initInterceptors();
}
Expand Down

0 comments on commit 577ae00

Please sign in to comment.