You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2014/08/27 13:40:57 UTC

[jira] [Resolved] (FELIX-4616) BundleRepository ResourceComparator violates comparison contract

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

Carsten Ziegeler resolved FELIX-4616.
-------------------------------------

    Resolution: Fixed

Fixed in rev 1620867

> BundleRepository ResourceComparator violates comparison contract
> ----------------------------------------------------------------
>
>                 Key: FELIX-4616
>                 URL: https://issues.apache.org/jira/browse/FELIX-4616
>             Project: Felix
>          Issue Type: Bug
>    Affects Versions: bundlerepository-1.6.6
>            Reporter: James Scott
>            Assignee: Carsten Ziegeler
>             Fix For: bundlerepository-2.0.4
>
>
> The ResourceComparator use to sort resources by presentation name may cause the Arrays.sort to throw IllegalArgumentException if bundles without a bundle name are present.
> This occurs because -1 is always returned if two compared resources do not have a bundle name.
> This violates the sgn(x,y)=-sgn(y,x) for all x,y.
> This forced us into a workaround of setting a system property to force  Arrays.sort to use the legacy sort that does not throw exceptions.



--
This message was sent by Atlassian JIRA
(v6.2#6252)