fix sonar issue squid:S1989: Exceptions should not be thrown from servlet methods

This commit is contained in:
Sebastian Sdorra
2019-06-13 12:03:02 +02:00
parent 8a2573764f
commit bc8c89cbf8
2 changed files with 16 additions and 8 deletions

View File

@@ -47,7 +47,7 @@ class StaticResourceServletTest {
}
@Test
void shouldReturnNotFound() throws IOException {
void shouldReturnNotFound() {
doReturn("/scm").when(request).getContextPath();
doReturn("/scm/resource.txt").when(request).getRequestURI();
doReturn(context).when(request).getServletContext();