Skip to content

Commit

Permalink
Merge branch 'master' into jersey-2.28
Browse files Browse the repository at this point in the history
  • Loading branch information
jplock committed Feb 7, 2019
2 parents 6e923da + b69c8f4 commit 0069e5b
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
lesscpy==0.13.0
Sphinx==1.8.3
Sphinx==1.8.4
sphinx-autobuild==0.7.1
2 changes: 1 addition & 1 deletion docs/source/about/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ v2.0.0: Unreleased

.. _rel-1.3.8:

v1.3.8: Jan 2, 2018
v1.3.8: Jan 2, 2019
===================

* Fix CVE-2018-10237 by upgrading Guava to 24.1.1 (`#2587 <https://github.com/dropwizard/dropwizard/pull/2587>`_)
Expand Down
4 changes: 2 additions & 2 deletions dropwizard-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>1.9.8</version>
<version>1.9.9</version>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
Expand All @@ -180,7 +180,7 @@
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>3.6.2</version>
<version>3.6.3</version>
<exclusions>
<exclusion>
<groupId>org.yaml</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ protected void doGet(HttpServletRequest req,
@Override
protected void doPost(HttpServletRequest req,
HttpServletResponse resp) throws ServletException, IOException {
final Task task = tasks.get(req.getPathInfo());
final String pathInfo = req.getPathInfo();
final Task task = pathInfo != null ? tasks.get(pathInfo) : null;
if (task != null) {
resp.setContentType(CONTENT_TYPE);
final PrintWriter output = resp.getWriter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.junit.Test;

import javax.servlet.ReadListener;
import javax.servlet.ServletException;
import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
Expand Down Expand Up @@ -236,6 +237,16 @@ public void execute(Map<String, List<String>> parameters, PrintWriter output) th
"vacuum-cleaning-exceptions"));
}

@Test
public void testReturnsA404ForTaskRoot() throws ServletException, IOException {
when(request.getMethod()).thenReturn("POST");
when(request.getPathInfo()).thenReturn(null);

servlet.service(request, response);

verify(response).sendError(404);
}

@SuppressWarnings("InputStreamSlowMultibyteRead")
private static class TestServletInputStream extends ServletInputStream {
private InputStream delegate;
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<junit.version>4.12</junit.version>
<junit5.version>5.3.2</junit5.version>
<assertj.version>3.11.1</assertj.version>
<mockito.version>2.23.4</mockito.version>
<mockito.version>2.24.0</mockito.version>
</properties>

<developers>
Expand Down

0 comments on commit 0069e5b

Please sign in to comment.