Commit cd092e02 authored by Dave Syer's avatar Dave Syer

Remove unecessary Jackson dependency in trace filter

parent 08ddbe79
......@@ -37,9 +37,6 @@ import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.filter.OncePerRequestFilter;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
/**
* Servlet {@link Filter} that logs all requests to a {@link TraceRepository}.
*
......@@ -55,8 +52,6 @@ public class WebRequestTraceFilter extends OncePerRequestFilter implements Order
private final TraceRepository traceRepository;
private final ObjectMapper objectMapper = new ObjectMapper();
private ErrorAttributes errorAttributes;
/**
......@@ -93,16 +88,9 @@ public class WebRequestTraceFilter extends OncePerRequestFilter implements Order
this.logger.trace("Processing request " + request.getMethod() + " "
+ request.getRequestURI());
if (this.dumpRequests) {
try {
@SuppressWarnings("unchecked")
Map<String, Object> headers = (Map<String, Object>) trace
.get("headers");
this.logger.trace("Headers: "
+ this.objectMapper.writeValueAsString(headers));
}
catch (JsonProcessingException ex) {
throw new IllegalStateException("Cannot create JSON", ex);
}
@SuppressWarnings("unchecked")
Map<String, Object> headers = (Map<String, Object>) trace.get("headers");
this.logger.trace("Headers: " + headers);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment