diff --git a/arex-instrumentation/servlet/arex-httpservlet/src/main/java/io/arex/inst/httpservlet/ServletAdviceHelper.java b/arex-instrumentation/servlet/arex-httpservlet/src/main/java/io/arex/inst/httpservlet/ServletAdviceHelper.java index 2f72b4032..0d2921bfe 100644 --- a/arex-instrumentation/servlet/arex-httpservlet/src/main/java/io/arex/inst/httpservlet/ServletAdviceHelper.java +++ b/arex-instrumentation/servlet/arex-httpservlet/src/main/java/io/arex/inst/httpservlet/ServletAdviceHelper.java @@ -210,8 +210,8 @@ private static boolean shouldSkip(ServletAdapter adapter } // skip if pre-request http-method is HEAD or OPTIONS - if (HttpMethod.HEAD.matches(adapter.getMethod(httpServletRequest)) - || HttpMethod.OPTIONS.matches(adapter.getMethod(httpServletRequest))) { + if (HttpMethod.HEAD.name().equals(adapter.getMethod(httpServletRequest)) + || HttpMethod.OPTIONS.name().equals(adapter.getMethod(httpServletRequest))) { return true; }