[Git][java-team/tomcat8][master] Fixed the build failure with Easymock 4 (Closes: #913402)
Emmanuel Bourg
gitlab at salsa.debian.org
Mon Nov 12 09:52:44 GMT 2018
Emmanuel Bourg pushed to branch master at Debian Java Maintainers / tomcat8
Commits:
2abcabdc by Emmanuel Bourg at 2018-11-12T09:52:19Z
Fixed the build failure with Easymock 4 (Closes: #913402)
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/0026-easymock4-compatibility.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+tomcat8 (8.5.35-2) unstable; urgency=medium
+
+ * Team upload.
+ * Fixed the build failure with Easymock 4 (Closes: #913402)
+
+ -- Emmanuel Bourg <ebourg at apache.org> Mon, 12 Nov 2018 10:52:08 +0100
+
tomcat8 (8.5.35-1) unstable; urgency=medium
* Team upload.
=====================================
debian/patches/0026-easymock4-compatibility.patch
=====================================
@@ -0,0 +1,109 @@
+Description: Fixes the compatibility with the version of Easymock in Debian
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/test/org/apache/catalina/valves/TestCrawlerSessionManagerValve.java
++++ b/test/org/apache/catalina/valves/TestCrawlerSessionManagerValve.java
+@@ -40,13 +40,13 @@
+ CrawlerSessionManagerValve valve = new CrawlerSessionManagerValve();
+ valve.setCrawlerIps("216\\.58\\.206\\.174");
+ valve.setCrawlerUserAgents(valve.getCrawlerUserAgents());
+- valve.setNext(EasyMock.createMock(Valve.class));
++ valve.setNext((Valve) EasyMock.createMock(Valve.class));
+ HttpSession session = createSessionExpectations(valve, true);
+ Request request = createRequestExpectations("216.58.206.174", session, true);
+
+ EasyMock.replay(request, session);
+
+- valve.invoke(request, EasyMock.createMock(Response.class));
++ valve.invoke(request, (Response) EasyMock.createMock(Response.class));
+
+ EasyMock.verify(request, session);
+ }
+@@ -56,13 +56,13 @@
+ CrawlerSessionManagerValve valve = new CrawlerSessionManagerValve();
+ valve.setCrawlerIps("216\\.58\\.206\\.174");
+ valve.setCrawlerUserAgents(valve.getCrawlerUserAgents());
+- valve.setNext(EasyMock.createMock(Valve.class));
++ valve.setNext((Valve) EasyMock.createMock(Valve.class));
+ HttpSession session = createSessionExpectations(valve, false);
+ Request request = createRequestExpectations("127.0.0.1", session, false);
+
+ EasyMock.replay(request, session);
+
+- valve.invoke(request, EasyMock.createMock(Response.class));
++ valve.invoke(request, (Response) EasyMock.createMock(Response.class));
+
+ EasyMock.verify(request, session);
+ }
+@@ -73,7 +73,7 @@
+ valve.setCrawlerUserAgents(valve.getCrawlerUserAgents());
+ valve.setHostAware(true);
+ valve.setContextAware(true);
+- valve.setNext(EasyMock.createMock(Valve.class));
++ valve.setNext((Valve) EasyMock.createMock(Valve.class));
+
+ verifyCrawlingLocalhost(valve, "localhost");
+ verifyCrawlingLocalhost(valve, "example.invalid");
+@@ -87,14 +87,14 @@
+
+ EasyMock.replay(request, session);
+
+- valve.invoke(request, EasyMock.createMock(Response.class));
++ valve.invoke(request, (Response) EasyMock.createMock(Response.class));
+
+ EasyMock.verify(request, session);
+ }
+
+
+ private HttpSession createSessionExpectations(CrawlerSessionManagerValve valve, boolean isBot) {
+- HttpSession session = EasyMock.createMock(HttpSession.class);
++ HttpSession session = (HttpSession) EasyMock.createMock(HttpSession.class);
+ if (isBot) {
+ EasyMock.expect(session.getId()).andReturn("id").times(2);
+ session.setAttribute(valve.getClass().getName(), valve);
+@@ -111,7 +111,7 @@
+ }
+
+ private Request createRequestExpectations(String ip, HttpSession session, boolean isBot, String hostname, String userAgent) {
+- Request request = EasyMock.createMock(Request.class);
++ Request request = (Request) EasyMock.createMock(Request.class);
+ EasyMock.expect(request.getRemoteAddr()).andReturn(ip);
+ EasyMock.expect(request.getHost()).andReturn(simpleHostWithName(hostname));
+ EasyMock.expect(request.getContext()).andReturn(simpleContextWithName());
+@@ -125,14 +125,14 @@
+ }
+
+ private Host simpleHostWithName(String hostname) {
+- Host host = EasyMock.createMock(Host.class);
++ Host host = (Host) EasyMock.createMock(Host.class);
+ EasyMock.expect(host.getName()).andReturn(hostname);
+ EasyMock.replay(host);
+ return host;
+ }
+
+ private Context simpleContextWithName() {
+- Context context = EasyMock.createMock(Context.class);
++ Context context = (Context) EasyMock.createMock(Context.class);
+ EasyMock.expect(context.getName()).andReturn("/examples");
+ EasyMock.replay(context);
+ return context;
+--- a/test/org/apache/catalina/valves/TestSSLValve.java
++++ b/test/org/apache/catalina/valves/TestSSLValve.java
+@@ -36,7 +36,7 @@
+ public static class MockRequest extends Request {
+
+ public MockRequest() {
+- setConnector(EasyMock.createMock(Connector.class));
++ setConnector((Connector) EasyMock.createMock(Connector.class));
+ setCoyoteRequest(new org.apache.coyote.Request());
+ }
+
+@@ -93,7 +93,7 @@
+ private SSLValve valve = new SSLValve();
+
+ private MockRequest mockRequest = new MockRequest();
+- private Valve mockNext = EasyMock.createMock(Valve.class);
++ private Valve mockNext = (Valve) EasyMock.createMock(Valve.class);
+
+
+ @Before
=====================================
debian/patches/series
=====================================
@@ -11,3 +11,4 @@
0023-disable-shutdown-by-socket.patch
0024-systemd-log-formatter.patch
0025-invalid-configuration-exit-status.patch
+0026-easymock4-compatibility.patch
View it on GitLab: https://salsa.debian.org/java-team/tomcat8/commit/2abcabdcdbecaf8d65594432d82c90f639e321e9
--
View it on GitLab: https://salsa.debian.org/java-team/tomcat8/commit/2abcabdcdbecaf8d65594432d82c90f639e321e9
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20181112/bb9a8ce6/attachment.html>
More information about the pkg-java-commits
mailing list