Browse Source

Removed return value from set method

master
Jim Martens 10 months ago
parent
commit
3f2e2aaef3
  1. 4
      oparl-server/src/main/java/de/twomartens/oparlservice/interceptors/TraceIdInterceptor.java

4
oparl-server/src/main/java/de/twomartens/oparlservice/interceptors/TraceIdInterceptor.java

@ -39,14 +39,12 @@ public class TraceIdInterceptor extends HandlerInterceptorAdapter
* A failsafe method to set a TraceId to the MDC.
*
* @param traceId should be a traceId, if it is null or empty a new one will be created.
* @return the traceId param, or a new one, if it was empty
*/
public String setOrCreateTraceId(String traceId) {
public void setOrCreateTraceId(String traceId) {
if (traceId == null || traceId.trim().isEmpty()) {
traceId = UUID.randomUUID().toString();
}
MDC.put(LOGGER_TRACE_ID, traceId);
return traceId;
}
/**

Loading…
Cancel
Save