Github user afs commented on a diff in the pull request:
https://github.com/apache/jena/pull/314#discussion_r153745134
--- Diff:
jena-core/src/main/java/org/apache/jena/assembler/assemblers/AssemblerBase.java
---
@@ -63,11 +63,16 @@ protected static RDFNode getUnique( Resource root,
Property property )
throw new NotUniqueException( root, property );
}
- protected void checkType( Resource root, Resource type )
- {
- if (!root.hasProperty( RDF.type, type ))
- throw new CannotConstructException( this.getClass(), root,
type );
- }
+ /**
+ * Throws {@link CannotConstructException} if the offered resource
isn't any of the offered types.
+ *
+ * @param root resource to check
+ * @param types types for which to check
+ */
+ protected void checkType( Resource root, Resource... types ) {
--- End diff --
I don't understand this. An assembler resource must have one type so that
there is a unique mapping to the implementation to call. I don't see in the
code anywhere calling with 2+ arguments.
---