Skip to content

Commit

Permalink
Fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzhiguo committed Oct 10, 2024
1 parent fa68b80 commit dafb0ab
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class AuthInboundFilter implements InboundFilter {
@Override
public <T extends InboundRequest> void filter(InboundInvocation<T> invocation, InboundFilterChain chain) {
ServicePolicy servicePolicy = invocation.getServiceMetadata().getServicePolicy();
AuthPolicy authPolicy = servicePolicy.getAuthPolicy();
AuthPolicy authPolicy = servicePolicy == null ? null : servicePolicy.getAuthPolicy();
if (authPolicy != null && authPolicy.getType() != null) {
Authenticate authenticate = authenticates.get(authPolicy.getType());
if (authenticate != null) {
Expand Down

0 comments on commit dafb0ab

Please sign in to comment.