@Override @NotNull public Validator getRootValidator( NodeState before, NodeState after, CommitInfo info) { PermissionProvider pp = acConfig.getPermissionProvider(createReadOnlyRoot(before), workspaceName, principals); if (moveTracker.isEmpty()) { return new PermissionValidator(before, after, pp, this); } else { return new MoveAwarePermissionValidator(before, after, pp, this, moveTracker); } }
@Override @NotNull public Validator getRootValidator( NodeState before, NodeState after, CommitInfo info) { PermissionProvider pp = acConfig.getPermissionProvider(createReadOnlyRoot(before), workspaceName, principals); if (moveTracker.isEmpty()) { return new PermissionValidator(before, after, pp, this); } else { return new MoveAwarePermissionValidator(before, after, pp, this, moveTracker); } }
@Override @Nonnull public Validator getRootValidator( NodeState before, NodeState after, CommitInfo info) { PermissionProvider pp = acConfig.getPermissionProvider(createReadOnlyRoot(before), workspaceName, principals); if (moveTracker.isEmpty()) { return new PermissionValidator(before, after, pp, this); } else { return new MoveAwarePermissionValidator(before, after, pp, this, moveTracker); } }
@Test public void testIsEmpty() { assertTrue(new MoveTracker().isEmpty()); }
@Test public void testNotEmpty() { MoveTracker mt = new MoveTracker(); mt.addMove("/a/b/c", "/d/e/f"); assertFalse(mt.isEmpty()); }