From f9915bf2ccc3ab2bac12340b8b973f273394d854 Mon Sep 17 00:00:00 2001 From: tbradellis Date: Thu, 9 Mar 2023 14:22:11 -0500 Subject: [PATCH] fix tomcat jakarta naming --- .../{tomcat7 => tomcat10}/AsyncListenerFactory.java | 2 +- .../instrumentation/{tomcat7 => tomcat10}/TomcatRequest.java | 2 +- .../instrumentation/{tomcat7 => tomcat10}/TomcatResponse.java | 2 +- .../{tomcat7 => tomcat10}/TomcatServletRequestListener.java | 4 ++-- .../java/org/apache/catalina/connector/Request_Weaved.java | 2 +- .../java/org/apache/catalina/core/StandardContext_Weaved.java | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) rename instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/{tomcat7 => tomcat10}/AsyncListenerFactory.java (96%) rename instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/{tomcat7 => tomcat10}/TomcatRequest.java (97%) rename instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/{tomcat7 => tomcat10}/TomcatResponse.java (95%) rename instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/{tomcat7 => tomcat10}/TomcatServletRequestListener.java (95%) diff --git a/instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat7/AsyncListenerFactory.java b/instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat10/AsyncListenerFactory.java similarity index 96% rename from instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat7/AsyncListenerFactory.java rename to instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat10/AsyncListenerFactory.java index 20f32480fe..d869e89627 100644 --- a/instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat7/AsyncListenerFactory.java +++ b/instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat10/AsyncListenerFactory.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.tomcat7; +package com.nr.agent.instrumentation.tomcat10; import com.newrelic.agent.bridge.AgentBridge; import com.newrelic.api.agent.weaver.CatchAndLog; diff --git a/instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat7/TomcatRequest.java b/instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat10/TomcatRequest.java similarity index 97% rename from instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat7/TomcatRequest.java rename to instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat10/TomcatRequest.java index 18bc6369e8..8048fa1e56 100644 --- a/instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat7/TomcatRequest.java +++ b/instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat10/TomcatRequest.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.tomcat7; +package com.nr.agent.instrumentation.tomcat10; import com.newrelic.api.agent.ExtendedRequest; import com.newrelic.api.agent.HeaderType; diff --git a/instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat7/TomcatResponse.java b/instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat10/TomcatResponse.java similarity index 95% rename from instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat7/TomcatResponse.java rename to instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat10/TomcatResponse.java index 16da5da2c4..cb6b060927 100644 --- a/instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat7/TomcatResponse.java +++ b/instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat10/TomcatResponse.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.tomcat7; +package com.nr.agent.instrumentation.tomcat10; import com.newrelic.api.agent.HeaderType; import com.newrelic.api.agent.Response; diff --git a/instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat7/TomcatServletRequestListener.java b/instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat10/TomcatServletRequestListener.java similarity index 95% rename from instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat7/TomcatServletRequestListener.java rename to instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat10/TomcatServletRequestListener.java index 22b63bfa1c..a6073590ec 100644 --- a/instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat7/TomcatServletRequestListener.java +++ b/instrumentation/tomcat-10/src/main/java/com/nr/agent/instrumentation/tomcat10/TomcatServletRequestListener.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.tomcat7; +package com.nr.agent.instrumentation.tomcat10; import com.newrelic.agent.bridge.AgentBridge; import com.newrelic.api.agent.NewRelic; @@ -21,7 +21,7 @@ public final class TomcatServletRequestListener implements ServletRequestListener { - private static final String EXCEPTION_ATTRIBUTE_NAME = "javax.servlet.error.exception"; + private static final String EXCEPTION_ATTRIBUTE_NAME = "jakarta.servlet.error.exception"; private static final String REQUEST_FIELD = "request"; private final Field requestField; diff --git a/instrumentation/tomcat-10/src/main/java/org/apache/catalina/connector/Request_Weaved.java b/instrumentation/tomcat-10/src/main/java/org/apache/catalina/connector/Request_Weaved.java index fd13fc1599..a97799f707 100644 --- a/instrumentation/tomcat-10/src/main/java/org/apache/catalina/connector/Request_Weaved.java +++ b/instrumentation/tomcat-10/src/main/java/org/apache/catalina/connector/Request_Weaved.java @@ -10,7 +10,7 @@ import com.newrelic.api.agent.NewRelic; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.instrumentation.tomcat7.AsyncListenerFactory; +import com.nr.agent.instrumentation.tomcat10.AsyncListenerFactory; import jakarta.servlet.AsyncContext; import jakarta.servlet.ServletRequest; import jakarta.servlet.ServletResponse; diff --git a/instrumentation/tomcat-10/src/main/java/org/apache/catalina/core/StandardContext_Weaved.java b/instrumentation/tomcat-10/src/main/java/org/apache/catalina/core/StandardContext_Weaved.java index c88d25776e..71d2b5eeb8 100644 --- a/instrumentation/tomcat-10/src/main/java/org/apache/catalina/core/StandardContext_Weaved.java +++ b/instrumentation/tomcat-10/src/main/java/org/apache/catalina/core/StandardContext_Weaved.java @@ -10,7 +10,7 @@ import com.newrelic.api.agent.NewRelic; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.instrumentation.tomcat7.TomcatServletRequestListener; +import com.nr.agent.instrumentation.tomcat10.TomcatServletRequestListener; import jakarta.servlet.ServletRequestListener; import java.util.logging.Level;