diff --git a/carapace-server/src/main/java/org/carapaceproxy/api/RoutesResource.java b/carapace-server/src/main/java/org/carapaceproxy/api/RoutesResource.java index 97080720c..2de48a705 100644 --- a/carapace-server/src/main/java/org/carapaceproxy/api/RoutesResource.java +++ b/carapace-server/src/main/java/org/carapaceproxy/api/RoutesResource.java @@ -19,6 +19,7 @@ */ package org.carapaceproxy.api; +import static org.carapaceproxy.server.mapper.StandardEndpointMapper.ACME_CHALLENGE_ROUTE_ACTION_ID; import java.util.ArrayList; import java.util.List; import javax.servlet.ServletContext; @@ -26,7 +27,6 @@ import javax.ws.rs.Path; import javax.ws.rs.Produces; import org.carapaceproxy.core.HttpProxyServer; -import static org.carapaceproxy.server.mapper.StandardEndpointMapper.ACME_CHALLENGE_ROUTE_ACTION_ID; /** * Access to configured routes @@ -77,24 +77,25 @@ public String getMatcher() { return matcher; } - public String getMaintenanceAction() { return maintenanceAction; } + public String getMaintenanceAction() { + return maintenanceAction; + } } @GET public List getAll() { - final List routes = new ArrayList(); + final List routes = new ArrayList<>(); HttpProxyServer server = (HttpProxyServer) context.getAttribute("server"); server.getMapper().getRoutes().stream() .filter(r -> !r.getId().equals(ACME_CHALLENGE_ROUTE_ACTION_ID)) - .forEach(route -> { - routes.add(new RouteBean( - route.getId(), - route.getAction(), - route.getErrorAction(), - route.isEnabled(), - route.getMatcher().getDescription(), - route.getMaintenanceModeAction())); - }); + .forEach(route -> routes.add(new RouteBean( + route.getId(), + route.getAction(), + route.getErrorAction(), + route.isEnabled(), + route.getMatcher().getDescription(), + route.getMaintenanceModeAction() + ))); return routes; }