Skip to content

Commit

Permalink
fix NPE in fileUtils
Browse files Browse the repository at this point in the history
Signed-off-by: Lev Povolotsky <lev@swirldslabs.com>
  • Loading branch information
povolev15 committed Nov 6, 2023
1 parent 68a4911 commit b1a7e65
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit b1a7e65

Please sign in to comment.