[
https://issues.apache.org/jira/browse/JENA-353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13503443#comment-13503443
]
Ian Dickinson commented on JENA-353:
------------------------------------
What's the use case when this makes a difference? The documentation is correct:
when you do
L1.append( L2 )
where L1 == nil, the post-condition remains true that neither list has a
different set of triples than it did before the append operation. If your
application needs to copy the list so that the appended list (or the original)
can be side-effected by other code, you have `RDFList.copy`. I'm happy to
consider changes to the current contract, but the motivation needs to be
clearer. Copying a list is potentially an expensive operation, so it should be
very clear to the caller when it is going to take place.
> RDFList.append doc indicates a copy is created not always so.
> -------------------------------------------------------------
>
> Key: JENA-353
> URL: https://issues.apache.org/jira/browse/JENA-353
> Project: Apache Jena
> Issue Type: Bug
> Affects Versions: Jena 2.7.4
> Reporter: Claude Warren
>
> Documentation for RDFList.append() indicates that a copy is created, both
> lists are merged into the copy and the copy returned so as to be "non
> side-effecting operation on either this list or the given list"
> However, in the case where this list is empty the other list is returned. I
> believe copy of the other should be returned in this case.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira