@Test public void testClearRequestToken() { createAndRegisterNewRequestToken("somekey", "somevalue"); clearRequestToken(); assertNull(getCurrentRequestToken()); assertNull(getCurrentTraceToken()); assertEquals(currentThread().getName(), "testing thread name"); }
public static void clearRequestToken() { TokenState oldToken = TraceTokenManager.token.get(); token.remove(); if (oldToken != null) { currentThread().setName(oldToken.getOldThreadName()); } }
TraceTokenManager { public static void clearRequestToken() { TokenState oldToken = TraceTokenManager.token.get(); token.remove(); if (oldToken != null) { currentThread().setName(oldToken.getOldThreadName()); } } }
TraceTokenManager { public static void clearRequestToken() { TokenState oldToken = TraceTokenManager.token.get(); token.remove(); if (oldToken != null) { currentThread().setName(oldToken.getOldThreadName()); } } private  TraceTokenManager(); }
TraceTokenManager { public static void clearRequestToken() { TokenState oldToken = TraceTokenManager.token.get(); token.remove(); if (oldToken != null) { currentThread().setName(oldToken.getOldThreadName()); } } private  TraceTokenManager(); static TraceTokenScope registerRequestToken(@Nullable String tokenId); static TraceTokenScope registerTraceToken(@Nullable TraceToken token); @Deprecated @Nullable static String getCurrentRequestToken(); @Nullable static TraceToken getCurrentTraceToken(); static String createAndRegisterNewRequestToken(String... properties); static void clearRequestToken(); static TraceTokenScope addTraceTokenProperties(String... properties); }
TraceTokenManager { public static void clearRequestToken() { TokenState oldToken = TraceTokenManager.token.get(); token.remove(); if (oldToken != null) { currentThread().setName(oldToken.getOldThreadName()); } } private  TraceTokenManager(); static TraceTokenScope registerRequestToken(@Nullable String tokenId); static TraceTokenScope registerTraceToken(@Nullable TraceToken token); @Deprecated @Nullable static String getCurrentRequestToken(); @Nullable static TraceToken getCurrentTraceToken(); static String createAndRegisterNewRequestToken(String... properties); static void clearRequestToken(); static TraceTokenScope addTraceTokenProperties(String... properties);  }