Skip to content

Commit

Permalink
fix: popConfig interceptor.after finally (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
observeralone authored Jan 24, 2024
1 parent ea8b57e commit c6db50f
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,18 @@ public void before(MethodInfo methodInfo, Context context) {
public void after(MethodInfo methodInfo, Context context) {
IPluginConfig cfg = context.getConfig();
InitializeContext innerContext = (InitializeContext) context;

if (cfg == null || cfg.enabled() || cfg instanceof NoOpIPluginConfig) {
try {
this.interceptor.after(methodInfo, context);
} finally {
innerContext.popToBound();
innerContext.popRetBound();
try {
if (cfg == null || cfg.enabled() || cfg instanceof NoOpIPluginConfig) {
try {
this.interceptor.after(methodInfo, context);
} finally {
innerContext.popToBound();
innerContext.popRetBound();
}
}
} finally {
innerContext.popConfig();
}
innerContext.popConfig();
}

@Override
Expand Down

0 comments on commit c6db50f

Please sign in to comment.