import com.google.common.annotations.Beta;
import com.google.common.base.VerifyException;
-import java.util.Objects;
import java.util.Optional;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
*/
// FIXME: 7.0.0: this needs to be a tri-state present/absent/disabled
@Deprecated
- @NonNull Optional<SchemaPath> schemaPath();
+ @Nullable SchemaPath schemaPath();
@Deprecated
default @NonNull SchemaPath getSchemaPath() {
- return schemaPath().orElseThrow();
+ return verifyNotNull(schemaPath(), "Missing path for %s", this);
}
}
final Parent ours = effectiveParent();
final Parent theirs = other.effectiveParent();
return ours == theirs
- || ours != null && theirs != null && Objects.equals(ours.schemaPath(), theirs.schemaPath());
+ || ours != null && theirs != null && SchemaPathSupport.effectivelyEqual(ours.schemaPath(),
+ theirs.schemaPath());
}
}
}