diff --git a/kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/security/auth/SimpleAclAuthorizer.java b/kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/security/auth/SimpleAclAuthorizer.java index 1ca9ef811f..f09ff281af 100644 --- a/kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/security/auth/SimpleAclAuthorizer.java +++ b/kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/security/auth/SimpleAclAuthorizer.java @@ -156,11 +156,11 @@ public CompletableFuture canConsumeAsync(KafkaPrincipal principal, Reso topicName, principal.getName(), principal.getAuthenticationData(), ""); } - private void checkResourceType(Resource resource, ResourceType expectedResourceType) { - if (resource.getResourceType() != expectedResourceType) { + private void checkResourceType(Resource actual, ResourceType expected) { + if (actual.getResourceType() != expected) { throw new IllegalArgumentException( String.format("Expected resource type is [%s], but have [%s]", - expectedResourceType, resource.getResourceType())); + expected, actual.getResourceType())); } }