Format with Eclipse Oxygen SR2
This commit is contained in:
@@ -73,7 +73,7 @@ public abstract class JsonObjectDeserializer<T>
|
||||
*/
|
||||
protected abstract T deserializeObject(JsonParser jsonParser,
|
||||
DeserializationContext context, ObjectCodec codec, JsonNode tree)
|
||||
throws IOException;
|
||||
throws IOException;
|
||||
|
||||
/**
|
||||
* Helper method to extract a value from the given {@code jsonNode} or return
|
||||
|
||||
@@ -50,7 +50,7 @@ public class ApplicationContextHeaderFilter extends OncePerRequestFilter {
|
||||
@Override
|
||||
protected void doFilterInternal(HttpServletRequest request,
|
||||
HttpServletResponse response, FilterChain filterChain)
|
||||
throws ServletException, IOException {
|
||||
throws ServletException, IOException {
|
||||
response.addHeader(HEADER_NAME, this.applicationContext.getId());
|
||||
filterChain.doFilter(request, response);
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry {
|
||||
@Override
|
||||
protected void doFilterInternal(HttpServletRequest request,
|
||||
HttpServletResponse response, FilterChain chain)
|
||||
throws ServletException, IOException {
|
||||
throws ServletException, IOException {
|
||||
ErrorPageFilter.this.doFilter(request, response, chain);
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry {
|
||||
|
||||
private void handleErrorStatus(HttpServletRequest request,
|
||||
HttpServletResponse response, int status, String message)
|
||||
throws ServletException, IOException {
|
||||
throws ServletException, IOException {
|
||||
if (response.isCommitted()) {
|
||||
handleCommittedResponse(request, null);
|
||||
return;
|
||||
@@ -151,7 +151,7 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry {
|
||||
|
||||
private void handleException(HttpServletRequest request, HttpServletResponse response,
|
||||
ErrorWrapperResponse wrapped, Throwable ex)
|
||||
throws IOException, ServletException {
|
||||
throws IOException, ServletException {
|
||||
Class<?> type = ex.getClass();
|
||||
String errorPath = getErrorPath(type);
|
||||
if (errorPath == null) {
|
||||
@@ -168,7 +168,7 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry {
|
||||
|
||||
private void forwardToErrorPage(String path, HttpServletRequest request,
|
||||
HttpServletResponse response, Throwable ex)
|
||||
throws ServletException, IOException {
|
||||
throws ServletException, IOException {
|
||||
if (logger.isErrorEnabled()) {
|
||||
String message = "Forwarding to error page from request "
|
||||
+ getDescription(request) + " due to exception [" + ex.getMessage()
|
||||
|
||||
@@ -1124,13 +1124,13 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
|
||||
|
||||
protected String getResponse(String url,
|
||||
HttpComponentsClientHttpRequestFactory requestFactory, String... headers)
|
||||
throws IOException, URISyntaxException {
|
||||
throws IOException, URISyntaxException {
|
||||
return getResponse(url, HttpMethod.GET, requestFactory, headers);
|
||||
}
|
||||
|
||||
protected String getResponse(String url, HttpMethod method,
|
||||
HttpComponentsClientHttpRequestFactory requestFactory, String... headers)
|
||||
throws IOException, URISyntaxException {
|
||||
throws IOException, URISyntaxException {
|
||||
ClientHttpResponse response = getClientResponse(url, method, requestFactory,
|
||||
headers);
|
||||
try {
|
||||
@@ -1162,7 +1162,7 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
|
||||
|
||||
protected ClientHttpResponse getClientResponse(String url, HttpMethod method,
|
||||
HttpComponentsClientHttpRequestFactory requestFactory, String... headers)
|
||||
throws IOException, URISyntaxException {
|
||||
throws IOException, URISyntaxException {
|
||||
ClientHttpRequest request = requestFactory.createRequest(new URI(url), method);
|
||||
request.getHeaders().add("Cookie", "JSESSIONID=" + "123");
|
||||
for (String header : headers) {
|
||||
|
||||
@@ -199,7 +199,7 @@ public class JsonObjectDeserializerTests {
|
||||
@Override
|
||||
protected T deserializeObject(JsonParser jsonParser,
|
||||
DeserializationContext context, ObjectCodec codec, JsonNode tree)
|
||||
throws IOException {
|
||||
throws IOException {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public class NameAndAgeJsonComponent {
|
||||
@Override
|
||||
protected NameAndAge deserializeObject(JsonParser jsonParser,
|
||||
DeserializationContext context, ObjectCodec codec, JsonNode tree)
|
||||
throws IOException {
|
||||
throws IOException {
|
||||
String name = nullSafeValue(tree.get("name"), String.class);
|
||||
Integer age = nullSafeValue(tree.get("age"), Integer.class);
|
||||
return new NameAndAge(name, age);
|
||||
|
||||
@@ -30,9 +30,8 @@ public class TestServlet extends HttpServlet {
|
||||
@Override
|
||||
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
|
||||
throws ServletException, IOException {
|
||||
resp.getWriter()
|
||||
.print(((String) req.getServletContext()
|
||||
.getAttribute("listenerAttribute")) + " "
|
||||
resp.getWriter().print(
|
||||
((String) req.getServletContext().getAttribute("listenerAttribute")) + " "
|
||||
+ req.getAttribute("filterAttribute"));
|
||||
resp.getWriter().flush();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user