Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NPE #1032

Merged
merged 1 commit into from
Aug 26, 2019
Merged

Fix NPE #1032

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 @@ -106,8 +106,7 @@ public Timer startTimer(TimerName timerName) {

@Override
public AuxThreadContext createAuxThreadContext() {
// TODO Auto-generated method stub
return null;
return NopAuxThreadContext.INSTANCE;
}

@Override
Expand Down Expand Up @@ -186,4 +185,19 @@ public int getCurrentSuppressionKeyId() {
public void setCurrentSuppressionKeyId(int suppressionKeyId) {
this.currentSuppressionKeyId = suppressionKeyId;
}

private static class NopAuxThreadContext implements AuxThreadContext {

private static final AuxThreadContext INSTANCE = new NopAuxThreadContext();

@Override
public Span start() {
return NopTransactionService.LOCAL_SPAN;
}

@Override
public Span startAndMarkAsyncTransactionComplete() {
return NopTransactionService.LOCAL_SPAN;
}
}
}