Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
public class ResultsStatusApplyAdvice {

@Advice.OnMethodEnter(suppress = Throwable.class)
static void after(
@Advice.Argument(0) final Object content, @ActiveRequestContext RequestContext reqCtx) {
static void before(
@Advice.Argument(0) final Object content, @ActiveRequestContext final RequestContext reqCtx) {

if (!(content instanceof JsValue)) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,10 @@
public class StatusHeaderSendJsonAdvice {

@Advice.OnMethodEnter(suppress = Throwable.class)
static void before() {
CallDepthThreadLocalMap.incrementCallDepth(StatusHeader.class);
}
static void before(
@Advice.Argument(0) final JsonNode json, @ActiveRequestContext final RequestContext reqCtx) {

@Advice.OnMethodExit(suppress = Throwable.class, onThrowable = Throwable.class)
static void after(
@Advice.Argument(0) final JsonNode json, @ActiveRequestContext RequestContext reqCtx) {
final int depth = CallDepthThreadLocalMap.decrementCallDepth(StatusHeader.class);
if (depth > 0) {
if (CallDepthThreadLocalMap.incrementCallDepth(StatusHeader.class) > 0) {
return;
}

Expand Down Expand Up @@ -64,4 +59,9 @@ static void after(
throw new BlockingException("Blocked request (for StatusHeader/sendJson)");
}
}

@Advice.OnMethodExit(suppress = Throwable.class, onThrowable = Throwable.class)
static void after() {
CallDepthThreadLocalMap.decrementCallDepth(StatusHeader.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,11 @@ public void methodAdvice(MethodTransformer transformer) {
public static class StatusHeaderSendJsonAdvice {

@Advice.OnMethodEnter(suppress = Throwable.class)
static void before() {
CallDepthThreadLocalMap.incrementCallDepth(StatusHeader.class);
}
static void before(
@Advice.Argument(0) final JsonNode json,
@ActiveRequestContext final RequestContext reqCtx) {

@Advice.OnMethodExit(suppress = Throwable.class, onThrowable = Throwable.class)
static void after(
@Advice.Argument(0) final JsonNode json, @ActiveRequestContext RequestContext reqCtx) {
final int depth = CallDepthThreadLocalMap.decrementCallDepth(StatusHeader.class);
if (depth > 0) {
if (CallDepthThreadLocalMap.incrementCallDepth(StatusHeader.class) > 0) {
return;
}

Expand Down Expand Up @@ -102,4 +98,9 @@ static void after(
}
}
}

@Advice.OnMethodExit(suppress = Throwable.class, onThrowable = Throwable.class)
static void after() {
CallDepthThreadLocalMap.decrementCallDepth(StatusHeader.class);
}
}