History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: SES-252
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Arjohn Kampman
Reporter: Arjohn Kampman
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Sesame

wrong method signatures for add and remove methods with generics arguments

Created: 15/Mar/06 10:40 AM   Updated: 15/Mar/06 11:01 AM
Component/s: Repository API
Affects Version/s: 2.0-alpha-3, 2.0-alpha-2
Fix Version/s: 2.0-alpha-4


 Description   
From http://www.openrdf.org/forum/mvnforum/viewthread?thread=858 :
-------------------------------------------------------------------------------------------------------------------------------------------------------------
I used to to this in alpha-2:

repository.remove(repository.getStatements(aResource, null, null));

This doesn't work in alpha-3. The reason is, that while getStatements returns a CloseableIterator<RStatement>, remove expects a CloseableIterator<Statement>. As add is implemented expecting a CloseableIterator<? extends Statement> I guess this is just a leftover from changing the API.

Solution: Change remove(CloseableIterator<Statement> [...]) to remove(CloseableIterator<? extends Statement> [...]) in
org.openrdf.sesame.repository.DefaultTransaction
org.openrdf.sesame.repository.Transaction
org.openrdf.sesame.repository.Repository
-------------------------------------------------------------------------------------------------------------------------------------------------------------

The same applies to add and remove methods that take Collection<Statement> arguments.

 All   Comments   Change History      Sort Order:
There are no comments yet on this issue.