incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reto Bachmann-Gmür (JIRA) <>
Subject [jira] Closed: (CLEREZZA-431) RDFList should not write in its constructor
Date Tue, 08 Mar 2011 20:35:59 GMT


Reto Bachmann-Gmür closed CLEREZZA-431.

    Resolution: Fixed

> RDFList should not write in its constructor
> -------------------------------------------
>                 Key: CLEREZZA-431
>                 URL:
>             Project: Clerezza
>          Issue Type: Improvement
>            Reporter: Daniel Spicar
>            Assignee: Reto Bachmann-Gmür
>              Labels: list, rdfList
>         Attachments: clerezza-431-patch.diff
> The implementation of RdfList in the rdf.utils project performs a write when creating
an empty RdfList.
> This is dangerous because when the underlying graph is a LockableMGraphWrapper it tries
to get a write lock on the graph before adding. If the creation of the list happens inside
a read lock on the same graph this will create a deadlock. It requires a lot of knowledge
of the implementation to be aware of these side-effects.
> It may be better for users of RdflList if no such unexpected locks are set. The write
access happens, because for an empty list, the triple "listResource owl:sameAs rdf:Nil" is
added to the underlying graph. This is correct but not necessary. The suggestion is that the
presence of an rdf:first property is used to determine whether the list is empty or not. We
can provide a static method for the user to create an empty list with the owl:sameAs rdf:Nil
triple if a user desires to do so and is aware of the side effects. In the add and remove
methods the owl:sameAs rdf:Nil triple can still be removed/added as these operations clearly
require write access.

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message