@Test public void Update_with_nulls() { RDFConnection conn = new MiniRepository().openConnection(); conn.update(Collections.<STMT> emptySet(), null); conn.update(null, Collections.<STMT> emptySet()); conn.update(null, null); }
@Override public void update(Collection<STMT> removedStatements, Collection<STMT> addedStatements) { if (removedStatements != null) { repository.removeStatements(removedStatements); } if (addedStatements != null) { repository.add(addedStatements.toArray(new STMT[addedStatements.size()])); } }
MiniConnection implements RDFConnection { @Override public void update(Collection<STMT> removedStatements, Collection<STMT> addedStatements) { if (removedStatements != null) { repository.removeStatements(removedStatements); } if (addedStatements != null) { repository.add(addedStatements.toArray(new STMT[addedStatements.size()])); } } }
MiniConnection implements RDFConnection { @Override public void update(Collection<STMT> removedStatements, Collection<STMT> addedStatements) { if (removedStatements != null) { repository.removeStatements(removedStatements); } if (addedStatements != null) { repository.add(addedStatements.toArray(new STMT[addedStatements.size()])); } } MiniConnection(MiniRepository repository); }
MiniConnection implements RDFConnection { @Override public void update(Collection<STMT> removedStatements, Collection<STMT> addedStatements) { if (removedStatements != null) { repository.removeStatements(removedStatements); } if (addedStatements != null) { repository.add(addedStatements.toArray(new STMT[addedStatements.size()])); } } MiniConnection(MiniRepository repository); void addStatements(STMT... stmts); @Override RDFBeanTransaction beginTransaction(boolean readOnly, int txTimeout, int isolationLevel); @Override void clear(); @Override void close(); @Override BID createBNode(); @Override Q createUpdate(UpdateLanguage<D, Q> updateLanguage, D definition); @SuppressWarnings("unchecked") @Override Q createQuery(QueryLanguage<D, Q> queryLanguage, D definition); @Override boolean exists(ID subject, UID predicate, NODE object, UID context, boolean includeInferred); @Override CloseableIterator<STMT> findStatements(ID subject, UID predicate,
            NODE object, UID context, boolean includeInferred); @Override long getNextLocalId(); MiniRepository getRepository(); @Override void remove(ID subject, UID predicate, NODE object, UID context); @Override void update(Collection<STMT> removedStatements, Collection<STMT> addedStatements); @Override QueryOptions getQueryOptions(); @Override InferenceOptions getInferenceOptions(); }
MiniConnection implements RDFConnection { @Override public void update(Collection<STMT> removedStatements, Collection<STMT> addedStatements) { if (removedStatements != null) { repository.removeStatements(removedStatements); } if (addedStatements != null) { repository.add(addedStatements.toArray(new STMT[addedStatements.size()])); } } MiniConnection(MiniRepository repository); void addStatements(STMT... stmts); @Override RDFBeanTransaction beginTransaction(boolean readOnly, int txTimeout, int isolationLevel); @Override void clear(); @Override void close(); @Override BID createBNode(); @Override Q createUpdate(UpdateLanguage<D, Q> updateLanguage, D definition); @SuppressWarnings("unchecked") @Override Q createQuery(QueryLanguage<D, Q> queryLanguage, D definition); @Override boolean exists(ID subject, UID predicate, NODE object, UID context, boolean includeInferred); @Override CloseableIterator<STMT> findStatements(ID subject, UID predicate,
            NODE object, UID context, boolean includeInferred); @Override long getNextLocalId(); MiniRepository getRepository(); @Override void remove(ID subject, UID predicate, NODE object, UID context); @Override void update(Collection<STMT> removedStatements, Collection<STMT> addedStatements); @Override QueryOptions getQueryOptions(); @Override InferenceOptions getInferenceOptions();  }