Skip to content

Commit

Permalink
GH-3826 revert incompatible changes to interface
Browse files Browse the repository at this point in the history
  • Loading branch information
abrokenjester committed Aug 6, 2022
1 parent c95e95a commit 8e7f2a1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ public interface Function {
* @param args the function input arguments.
* @return the function result value.
* @throws ValueExprEvaluationException
* @deprecated since 3.3.0. Use {@link #evaluate(TripleSource, Value...)} instead.
* @deprecated since 3.3.0. Use {@link #evaluate(TripleSource, Value...)} instead. A reference to a ValueFactory can
* be retrieved using {@link TripleSource#getValueFactory()} if needed.
*/
@Deprecated
default Value evaluate(ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException {
throw new UnsupportedOperationException("use evaluate(TripleSource, Value...) instead");
}
Value evaluate(ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException;

/**
* Evaluate the function over the supplied input arguments.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,9 @@ public Value evaluate(TripleSource tripleSource, Value... args)
// return a new boolean literal that is true if the input argument is a palindrome and exists as a label
return tripleSource.getValueFactory().createLiteral(palindrome && existing);
}

@Override
public Value evaluate(ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException {
throw new UnsupportedOperationException();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import org.eclipse.rdf4j.model.Literal;
import org.eclipse.rdf4j.model.Value;
import org.eclipse.rdf4j.model.ValueFactory;
import org.eclipse.rdf4j.query.algebra.evaluation.TripleSource;
import org.eclipse.rdf4j.query.algebra.evaluation.ValueExprEvaluationException;
import org.eclipse.rdf4j.query.algebra.evaluation.function.Function;
Expand Down Expand Up @@ -74,4 +75,9 @@ public Value evaluate(TripleSource tripleSource, Value... args)
// return our boolean result as a Literal
return literal(palindrome);
}

@Override
public Value evaluate(ValueFactory valueFactory, Value... args) throws ValueExprEvaluationException {
throw new UnsupportedOperationException();
}
}

0 comments on commit 8e7f2a1

Please sign in to comment.