jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Meschberger (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JCR-1107) ObjectIterator may return null, which is not readily expected from an Iterator
Date Mon, 03 Sep 2007 13:50:58 GMT

     [ https://issues.apache.org/jira/browse/JCR-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Felix Meschberger updated JCR-1107:
-----------------------------------

    Attachment: JCR-1107.diff

Proposed change to ObjectIterator.

The consequence of the look-ahead and non-1:1 mapping of mapped objects in the iterator and
underlying node iterator is, that the remove method may not be properly implemented. Therefore,
this method just throws an UnsupportedOperationException.

I understand, that there may be situations, where it may be desirable to have a 1:1 mapping
of the underlying node iterator to the ObjectIterator. But I assume, that in the context of
an application operating on mapped data, this is rather the exception than the rule.

> ObjectIterator may return null, which is not readily expected from an Iterator
> ------------------------------------------------------------------------------
>
>                 Key: JCR-1107
>                 URL: https://issues.apache.org/jira/browse/JCR-1107
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jcr-mapping
>    Affects Versions: 1.4
>            Reporter: Felix Meschberger
>             Fix For: 1.4
>
>         Attachments: JCR-1107.diff
>
>
> The ObjectIterator class implements an Iterator of objects mapped from an underlying
NodeIterator. This ObjectIterator may return null from next() if no mapping for a node in
the iterator exists. Rather than returning null, the iterator should probably just ignore
the unmappable node and return an object from the next node in the underlying iterator which
is mappable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message