Skip to content

Commit

Permalink
Fix code style with mvn spotless:apply
Browse files Browse the repository at this point in the history
  • Loading branch information
pfcoperez committed Sep 11, 2024
1 parent eccf215 commit d886a8a
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import static org.apache.zookeeper.ZooDefs.Ids.ANYONE_ID_UNSAFE;
import static org.junit.jupiter.api.Assertions.*;

import java.util.Collections;
import java.util.List;
import java.util.Optional;
Expand Down Expand Up @@ -477,13 +476,15 @@ public void testForbiddenAncestors() throws Exception {
client.start();

client.create().creatingParentsIfNeeded().forPath("/bat/bi/hiru");
client.setACL().withACL(Collections.singletonList(new ACL(0, ANYONE_ID_UNSAFE))).forPath("/bat");
client.setACL()
.withACL(Collections.singletonList(new ACL(0, ANYONE_ID_UNSAFE)))
.forPath("/bat");

// In creation attempts where the parent ("/bat") has ACL that restricts read, creation request fails.
try {
client.create().creatingParentsIfNeeded().forPath("/bat/bost");
fail("Expected NoAuthException when not authorized to read new node grandparent");
} catch(KeeperException.NoAuthException noAuthException) {
} catch (KeeperException.NoAuthException noAuthException) {
}

// But creating a node in the same subtree where its grandparent has read access is allowed and
Expand Down

0 comments on commit d886a8a

Please sign in to comment.