You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Kazuaki SUZUKI <ca...@gmail.com> on 2010/12/06 09:35:31 UTC
AbstractDataCache.containsAll may return wrong BitSet
Hi, all
AbstractDataCache.containsAll may return wrong BitSet,
bacause the method doesn't check whether the Collection<Object> is
sorted or not.
For instance,
The Set interface is a subset by Collection interface.
The Set interface doesn't guarantee its order.
thank you
Kazuaki SUZUKI
Re: AbstractDataCache.containsAll may return wrong BitSet
Posted by Rick Curtis <cu...@gmail.com>.
Kazuaki -
You are correct that there is a potential that containsAll(...) may return
an incorrect answer. In practice the OpenJPA code will always back the
Collection with a List implementation so this isn't a 'real' problem. This
is certainly something we should fix, but it's not super high priority. If
you would, go ahead and open a JIRA so someone can look at this in the
future.
Thanks,
Rick
On Mon, Dec 6, 2010 at 2:35 AM, Kazuaki SUZUKI <ca...@gmail.com>wrote:
> Hi, all
>
> AbstractDataCache.containsAll may return wrong BitSet,
> bacause the method doesn't check whether the Collection<Object> is
> sorted or not.
>
> For instance,
> The Set interface is a subset by Collection interface.
> The Set interface doesn't guarantee its order.
>
> thank you
>
>
>
> Kazuaki SUZUKI
>