Skip to content

Commit dafb0ab

Browse files
committed
Fix NPE
1 parent fa68b80 commit dafb0ab

File tree

1 file changed

+1
-1
lines changed
  • joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/invoke/filter/inbound

1 file changed

+1
-1
lines changed

joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/invoke/filter/inbound/AuthInboundFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public class AuthInboundFilter implements InboundFilter {
4848
@Override
4949
public <T extends InboundRequest> void filter(InboundInvocation<T> invocation, InboundFilterChain chain) {
5050
ServicePolicy servicePolicy = invocation.getServiceMetadata().getServicePolicy();
51-
AuthPolicy authPolicy = servicePolicy.getAuthPolicy();
51+
AuthPolicy authPolicy = servicePolicy == null ? null : servicePolicy.getAuthPolicy();
5252
if (authPolicy != null && authPolicy.getType() != null) {
5353
Authenticate authenticate = authenticates.get(authPolicy.getType());
5454
if (authenticate != null) {

0 commit comments

Comments
 (0)