protected void checkTarget()

in commons-rdf-simple/src/main/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParser.java [238:247]


    protected void checkTarget() {
        if (target == null) {
            throw new IllegalStateException("target has not been set");
        }
        if (getTargetGraph().isPresent() && getTargetDataset().isPresent()) {
            // This should not happen as each target(..) method resets the
            // optionals
            throw new IllegalStateException("targetGraph and targetDataset can't both be set");
        }
    }