From 1f9ac90988d7615d9d1fc423906be6601f1ad6db Mon Sep 17 00:00:00 2001 From: tbradellis Date: Tue, 13 Jun 2023 18:23:58 -0700 Subject: [PATCH] implement getStatus for nrwrapper add some code coverage for webrequestdispatcher drop unrelated tests and do separate optimize imports --- .../com/nr/instrumentation/servlet5/NRResponseWrapper.java | 7 +------ .../com/nr/instrumentation/servlet6/NRResponseWrapper.java | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/instrumentation/servlet-5.0/src/main/java/com/nr/instrumentation/servlet5/NRResponseWrapper.java b/instrumentation/servlet-5.0/src/main/java/com/nr/instrumentation/servlet5/NRResponseWrapper.java index f25bf4146a..0535f3893a 100644 --- a/instrumentation/servlet-5.0/src/main/java/com/nr/instrumentation/servlet5/NRResponseWrapper.java +++ b/instrumentation/servlet-5.0/src/main/java/com/nr/instrumentation/servlet5/NRResponseWrapper.java @@ -20,14 +20,9 @@ public NRResponseWrapper(HttpServletResponse response) { this.response = response; } - /** - * Since {@link #getStatus()} does not exist prior to Servlet 3.0, return 0, meaning "unknown". - * - * @since Servlet 3.0 - */ @Override public int getStatus() throws Exception { - return 0; + return response.getStatus(); } @Override diff --git a/instrumentation/servlet-6.0/src/main/java/com/nr/instrumentation/servlet6/NRResponseWrapper.java b/instrumentation/servlet-6.0/src/main/java/com/nr/instrumentation/servlet6/NRResponseWrapper.java index ff5b782457..6b03a7869d 100644 --- a/instrumentation/servlet-6.0/src/main/java/com/nr/instrumentation/servlet6/NRResponseWrapper.java +++ b/instrumentation/servlet-6.0/src/main/java/com/nr/instrumentation/servlet6/NRResponseWrapper.java @@ -20,14 +20,9 @@ public NRResponseWrapper(HttpServletResponse response) { this.response = response; } - /** - * Since {@link #getStatus()} does not exist prior to Servlet 3.0, return 0, meaning "unknown". - * - * @since Servlet 3.0 - */ @Override public int getStatus() throws Exception { - return 0; + return response.getStatus(); } @Override