Skip to content

Commit

Permalink
Allow null S3 grantee ID
Browse files Browse the repository at this point in the history
Minio does not return a grantee so reversing the comparison avoids a
NullPointerException.
  • Loading branch information
gaul committed Dec 22, 2024
1 parent 0b2420d commit 176d3d4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,9 @@ public boolean hasPermission(URI granteeURI, String permission) {
*/
protected Collection<Grant> findGrantsForGrantee(final String granteeId) {
return Collections2.filter(grants, new Predicate<Grant>() {
@Override
public boolean apply(Grant g) {
return g.getGrantee().getIdentifier().equals(granteeId);
return granteeId.equals(g.getGrantee().getIdentifier());
}
});
}
Expand Down

0 comments on commit 176d3d4

Please sign in to comment.