提交 ca97981d 编写于 作者: A Arjen Poutsma

Fixing the build, stupid java.util.Date

上级 f289b0ff
...@@ -982,7 +982,7 @@ public class ServletAnnotationControllerTests { ...@@ -982,7 +982,7 @@ public class ServletAnnotationControllerTests {
request.setCookies(new Cookie("date", "2008-11-18")); request.setCookies(new Cookie("date", "2008-11-18"));
MockHttpServletResponse response = new MockHttpServletResponse(); MockHttpServletResponse response = new MockHttpServletResponse();
servlet.service(request, response); servlet.service(request, response);
assertEquals("test-1226962800000", response.getContentAsString()); assertEquals("test-108", response.getContentAsString());
} }
@Test @Test
...@@ -1706,7 +1706,7 @@ public class ServletAnnotationControllerTests { ...@@ -1706,7 +1706,7 @@ public class ServletAnnotationControllerTests {
public void handle(@CookieValue("date") Date date, Writer writer) public void handle(@CookieValue("date") Date date, Writer writer)
throws IOException { throws IOException {
assertEquals("Invalid path variable value", new Date(108, 10, 18), date); assertEquals("Invalid path variable value", new Date(108, 10, 18), date);
writer.write("test-" + date.getTime()); writer.write("test-" + date.getYear());
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册