Skip to content

Commit

Permalink
Explicit lambda argument types
Browse files Browse the repository at this point in the history
  • Loading branch information
safris committed Oct 9, 2024
1 parent fce6195 commit d357f81
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions jetty-9/src/main/java/org/openjax/esc/EmbeddedJetty9.java
Original file line number Diff line number Diff line change
Expand Up @@ -282,14 +282,14 @@ private static void addAllServlets(final ServletContextHandler context, final Un
for (final Package pkg : Package.getPackages()) { // [A]
if (acceptPackage(pkg)) {
try {
PackageLoader.getContextPackageLoader().loadPackage(pkg, t -> {
if (Modifier.isAbstract(t.getModifiers()))
PackageLoader.getContextPackageLoader().loadPackage(pkg, (final Class<?> c) -> {
if (Modifier.isAbstract(c.getModifiers()))
return false;

if (scanServlets && HttpServlet.class.isAssignableFrom(t))
addServlet(context, (Class<? extends HttpServlet>)t, null);
else if (scanFilters && Filter.class.isAssignableFrom(t) && t.isAnnotationPresent(WebFilter.class))
addFilter(context, (Class<? extends Filter>)t, null);
if (scanServlets && HttpServlet.class.isAssignableFrom(c))
addServlet(context, (Class<? extends HttpServlet>)c, null);
else if (scanFilters && Filter.class.isAssignableFrom(c) && c.isAnnotationPresent(WebFilter.class))
addFilter(context, (Class<? extends Filter>)c, null);

return false;
});
Expand Down

0 comments on commit d357f81

Please sign in to comment.