From 82a50727d801c34b27483b81be7a4b6d02be123f Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 3 Mar 2021 14:40:46 -0600 Subject: [PATCH] Issue #6026 - Cleaning up uncovered HTTP methods warning Signed-off-by: Joakim Erdfelt --- .../jetty/security/ConstraintSecurityHandler.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/jetty-security/src/main/java/org/eclipse/jetty/security/ConstraintSecurityHandler.java b/jetty-security/src/main/java/org/eclipse/jetty/security/ConstraintSecurityHandler.java index 55416fd4dbc1..d82907f2839a 100644 --- a/jetty-security/src/main/java/org/eclipse/jetty/security/ConstraintSecurityHandler.java +++ b/jetty-security/src/main/java/org/eclipse/jetty/security/ConstraintSecurityHandler.java @@ -716,8 +716,8 @@ protected boolean checkWebResourcePermissions(String pathInContext, Request requ public void dump(Appendable out, String indent) throws IOException { dumpObjects(out, indent, - DumpableCollection.from("roles", _roles), - DumpableCollection.from("constraints", _constraintMappings)); + DumpableCollection.from("roles", _roles), + DumpableCollection.from("constraints", _constraintMappings)); } @Override @@ -741,14 +741,9 @@ public boolean checkPathsWithUncoveredHttpMethods() Set paths = getPathsWithUncoveredHttpMethods(); if (paths != null && !paths.isEmpty()) { - ContextHandler.Context currentContext = ContextHandler.getCurrentContext(); - - for (String p : paths) - { - LOG.warn("{} has uncovered http methods for path: {}", currentContext, p); - } - if (LOG.isDebugEnabled()) - LOG.debug("{} has uncovered http methods", currentContext, new Throwable()); + LOG.warn("{} has paths with uncovered http methods: [{}]", + ContextHandler.getCurrentContext(), + String.join(", ", paths)); return true; } return false;