diff --git a/hedera-node/hedera-file-service-impl/src/main/java/com/hedera/node/app/service/file/impl/utils/FileServiceUtils.java b/hedera-node/hedera-file-service-impl/src/main/java/com/hedera/node/app/service/file/impl/utils/FileServiceUtils.java index a193740ae4fe..ecccf0d7aeb0 100644 --- a/hedera-node/hedera-file-service-impl/src/main/java/com/hedera/node/app/service/file/impl/utils/FileServiceUtils.java +++ b/hedera-node/hedera-file-service-impl/src/main/java/com/hedera/node/app/service/file/impl/utils/FileServiceUtils.java @@ -173,7 +173,7 @@ public static void validateAndAddRequiredKeysForDelete( final var file = optionalFile.get(); - if (!file.hasKeys() || file.keys().keys().isEmpty() || file.keys().keys() == null) { + if (!file.hasKeys() || !file.keys().hasKeys() || file.keys().keys().isEmpty()) { // @todo('protobuf change needed') change to immutable file response code throw new HandleException(UNAUTHORIZED); }