Change
As far as I can tell, the GraphUtils.exactlyOneProperty function is only used correctly one place in the codebase (
|
exactlyOneProperty(root, VocabTDB1.pDescription) ; |
), the rest of the call sites assume that the function may actually return
false, something it will never do; it will either return
true or raise either
PropertyRequiredException or
NotUniqueException.
I suggest that the function is marked as deprecated, and a new one named assertExactlyOneProperty is used instead (that returns void - or raises one of the two aformentioned exceptions), and use that one internally in the codebase instead. External consumers of the existing function should be told to stop using the current function and migrate to the new one.
Are you interested in contributing a pull request for this task?
Yes
Change
As far as I can tell, the
GraphUtils.exactlyOnePropertyfunction is only used correctly one place in the codebase (jena/jena-tdb1/src/main/java/org/apache/jena/tdb1/assembler/IndexAssembler.java
Line 61 in 4ddc739
false, something it will never do; it will either returntrueor raise eitherPropertyRequiredExceptionorNotUniqueException.I suggest that the function is marked as deprecated, and a new one named
assertExactlyOnePropertyis used instead (that returns void - or raises one of the two aformentioned exceptions), and use that one internally in the codebase instead. External consumers of the existing function should be told to stop using the current function and migrate to the new one.Are you interested in contributing a pull request for this task?
Yes