[opencms-dev] ComparatorInverter with CmsPriorityTitleResourceComparator broken
fhsubscriptions at componio.net
fhsubscriptions at componio.net
Wed Mar 13 18:30:02 CET 2013
Hi,
we currently migrate a large project from OpenCms 7.5 to 8.5.1. Along
this we found the API to be inconsistent when working with comparators.
The following code workded fine with 7.x and is now broken:
CmsPriorityTitleResourceComparator titleComp = new
CmsPriorityTitleResourceComparator(cms.getCmsObject());
Comparator<CmsResource> titleCompInverted = new
ComparatorInverter(titleComp);
Problem is that the ComparatorInverter expects a Comparator typed with
I_CmsResource wheras CmsPriorityTitleResourceComparator (and all the
otheer CmsComparators) only implements Comparator typed with CmsResource.
Is this by design? How can we make use of the Inverter without writing
one on our own?
Thanks and regards,
\Fabian
More information about the opencms-dev
mailing list