java-jamonapi-jamon-update-dependencies.patch
| 1 | From fe2edb527a0b74341720c7c17ce77133415e84ce Mon Sep 17 00:00:00 2001 |
| 2 | From: Julien Lepiller <julien@lepiller.eu> |
| 3 | Date: Thu, 13 Sep 2018 20:11:07 +0200 |
| 4 | Subject: [PATCH] Update jamon dependencies. |
| 5 | |
| 6 | --- |
| 7 | .../java/com/jamonapi/http/JAMonJettyHandler.java | 15 +++++++-------- |
| 8 | .../java/com/jamonapi/http/JAMonTomcatValve.java | 1 - |
| 9 | .../java/com/jamonapi/http/JettyHttpMonItem.java | 2 +- |
| 10 | .../java/com/jamontomcat/JAMonTomcat55Valve.java | 1 - |
| 11 | 4 files changed, 8 insertions(+), 11 deletions(-) |
| 12 | |
| 13 | diff --git a/jamon/src/main/java/com/jamonapi/http/JAMonJettyHandler.java b/jamon/src/main/java/com/jamonapi/http/JAMonJettyHandler.java |
| 14 | index c117afa..3f94fc8 100644 |
| 15 | --- a/jamon/src/main/java/com/jamonapi/http/JAMonJettyHandler.java |
| 16 | +++ b/jamon/src/main/java/com/jamonapi/http/JAMonJettyHandler.java |
| 17 | @@ -1,10 +1,10 @@ |
| 18 | package com.jamonapi.http; |
| 19 | |
| 20 | |
| 21 | -import org.mortbay.jetty.HttpConnection; |
| 22 | -import org.mortbay.jetty.Request; |
| 23 | -import org.mortbay.jetty.Response; |
| 24 | -import org.mortbay.jetty.handler.HandlerWrapper; |
| 25 | +import org.eclipse.jetty.server.HttpConnection; |
| 26 | +import org.eclipse.jetty.server.Request; |
| 27 | +import org.eclipse.jetty.server.Response; |
| 28 | +import org.eclipse.jetty.server.handler.HandlerWrapper; |
| 29 | |
| 30 | import javax.servlet.ServletException; |
| 31 | import javax.servlet.http.HttpServletRequest; |
| 32 | @@ -28,14 +28,13 @@ public class JAMonJettyHandler extends HandlerWrapper implements HttpMonManage { |
| 33 | |
| 34 | /** Monitor the request and call any other requests in the decorator chain */ |
| 35 | @Override |
| 36 | - public void handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch) throws IOException, ServletException { |
| 37 | - final Request baseRequest = (request instanceof Request) ? ((Request)request) : HttpConnection.getCurrentConnection().getRequest(); |
| 38 | - final Response baseResponse = (response instanceof Response) ? ((Response)response) : HttpConnection.getCurrentConnection().getResponse(); |
| 39 | + public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { |
| 40 | + final Response baseResponse = (response instanceof Response) ? ((Response)response) : HttpConnection.getCurrentConnection().getHttpChannel().getResponse(); |
| 41 | |
| 42 | HttpMon httpMon=null; |
| 43 | try { |
| 44 | httpMon=httpMonFactory.start(baseRequest, baseResponse); |
| 45 | - super.handle(target, request, response, dispatch); |
| 46 | + super.handle(target, baseRequest, request, response); |
| 47 | } catch (Throwable e) { |
| 48 | httpMon.throwException(e); |
| 49 | } finally { |
| 50 | diff --git a/jamon/src/main/java/com/jamonapi/http/JAMonTomcatValve.java b/jamon/src/main/java/com/jamonapi/http/JAMonTomcatValve.java |
| 51 | index 6a3fe96..7d0bd0b 100644 |
| 52 | --- a/jamon/src/main/java/com/jamonapi/http/JAMonTomcatValve.java |
| 53 | +++ b/jamon/src/main/java/com/jamonapi/http/JAMonTomcatValve.java |
| 54 | @@ -116,7 +116,6 @@ public class JAMonTomcatValve extends org.apache.catalina.valves.ValveBase imple |
| 55 | |
| 56 | } |
| 57 | |
| 58 | - @Override |
| 59 | public String getInfo() { |
| 60 | return PREFIX; |
| 61 | } |
| 62 | diff --git a/jamon/src/main/java/com/jamonapi/http/JettyHttpMonItem.java b/jamon/src/main/java/com/jamonapi/http/JettyHttpMonItem.java |
| 63 | index 3507d93..79b8481 100644 |
| 64 | --- a/jamon/src/main/java/com/jamonapi/http/JettyHttpMonItem.java |
| 65 | +++ b/jamon/src/main/java/com/jamonapi/http/JettyHttpMonItem.java |
| 66 | @@ -3,7 +3,7 @@ package com.jamonapi.http; |
| 67 | |
| 68 | import com.jamonapi.Monitor; |
| 69 | import com.jamonapi.MonitorFactory; |
| 70 | -import org.mortbay.jetty.Request; |
| 71 | +import org.eclipse.jetty.server.Request; |
| 72 | |
| 73 | /** |
| 74 | * Used to monitor jetty requests via the JAMonJettyHandler. |
| 75 | diff --git a/jamon/src/main/java/com/jamontomcat/JAMonTomcat55Valve.java b/jamon/src/main/java/com/jamontomcat/JAMonTomcat55Valve.java |
| 76 | index 7be804c..af1c2f8 100644 |
| 77 | --- a/jamon/src/main/java/com/jamontomcat/JAMonTomcat55Valve.java |
| 78 | +++ b/jamon/src/main/java/com/jamontomcat/JAMonTomcat55Valve.java |
| 79 | @@ -113,7 +113,6 @@ public class JAMonTomcat55Valve extends org.apache.catalina.valves.ValveBase { |
| 80 | |
| 81 | } |
| 82 | |
| 83 | - @Override |
| 84 | public String getInfo() { |
| 85 | return PREFIX; |
| 86 | } |
| 87 | -- |
| 88 | 2.18.0 |
| 89 | |
| 90 |