@Override
final void checkApplicable(final ModificationPath path, final NodeModification modification,
- final Optional<TreeNode> current, final Version version) throws DataValidationFailedException {
+ final Optional<? extends TreeNode> current, final Version version) throws DataValidationFailedException {
switch (modification.getOperation()) {
case DELETE:
checkDeleteApplicable(modification, current);
}
protected void checkMergeApplicable(final ModificationPath path, final NodeModification modification,
- final Optional<TreeNode> current, final Version version) throws DataValidationFailedException {
- final Optional<TreeNode> original = modification.getOriginal();
+ final Optional<? extends TreeNode> current, final Version version) throws DataValidationFailedException {
+ final Optional<? extends TreeNode> original = modification.getOriginal();
if (original.isPresent() && current.isPresent()) {
/*
* We need to do conflict detection only and only if the value of leaf changed
* @throws DataValidationFailedException when a data dependency conflict is detected
*/
private static void checkWriteApplicable(final ModificationPath path, final NodeModification modification,
- final Optional<TreeNode> current, final Version version) throws DataValidationFailedException {
- final Optional<TreeNode> original = modification.getOriginal();
+ final Optional<? extends TreeNode> current, final Version version) throws DataValidationFailedException {
+ final Optional<? extends TreeNode> original = modification.getOriginal();
if (original.isPresent() && current.isPresent()) {
checkNotConflicting(path, original.get(), current.get());
} else {
}
}
- private static void checkDeleteApplicable(final NodeModification modification, final Optional<TreeNode> current) {
+ private static void checkDeleteApplicable(final NodeModification modification,
+ final Optional<? extends TreeNode> current) {
// Delete is always applicable, we do not expose it to subclasses
if (!current.isPresent()) {
LOG.trace("Delete operation turned to no-op on missing node {}", modification);
}
@Override
- Optional<TreeNode> apply(final ModifiedNode modification, final Optional<TreeNode> currentMeta,
+ Optional<? extends TreeNode> apply(final ModifiedNode modification, final Optional<? extends TreeNode> currentMeta,
final Version version) {
switch (modification.getOperation()) {
case DELETE:
protected abstract TreeNode applyMerge(ModifiedNode modification, TreeNode currentMeta, Version version);
protected abstract TreeNode applyWrite(ModifiedNode modification, NormalizedNode<?, ?> newValue,
- Optional<TreeNode> currentMeta, Version version);
+ Optional<? extends TreeNode> currentMeta, Version version);
/**
* Apply a nested operation. Since there may not actually be a nested operation
* modification is not applicable (e.g. leaf node).
*/
protected abstract void checkTouchApplicable(ModificationPath path, NodeModification modification,
- Optional<TreeNode> current, Version version) throws DataValidationFailedException;
+ Optional<? extends TreeNode> current, Version version) throws DataValidationFailedException;
/**
* Return the {@link WithStatus}-subclass schema associated with this operation.