Skip to content

Commit

Permalink
Fix NPE bug in LogSlot#entry when recording rule ID (alibaba#2980)
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephZhang3 authored Nov 30, 2022
1 parent 6dc2fdb commit 0561959
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,11 @@ public void entry(Context context, ResourceWrapper resourceWrapper, DefaultNode
fireEntry(context, resourceWrapper, obj, count, prioritized, args);
} catch (BlockException e) {
EagleEyeLogUtil.log(resourceWrapper.getName(), e.getClass().getSimpleName(), e.getRuleLimitApp(),
context.getOrigin(), e.getRule().getId(), count);
context.getOrigin(), e.getRule() != null ? e.getRule().getId() : null, count);
throw e;
} catch (Throwable e) {
RecordLog.warn("Unexpected entry exception", e);
}

}

@Override
Expand Down

0 comments on commit 0561959

Please sign in to comment.