I believe that the .sort()
method you were calling in 3.3 was "merely" an implementation detail of Railo's railo.runtime.type.ArrayImpl
class, rather than a generic (standard) Java class. So that put you at risk that the implementation might change anyway - and it has.
A small code change will allow you to use java.util.Collections
and the static sort()
method there:
var Collections = createObject( "java", "java.util.Collections" );
Collections.sort( a, createObject( "java",
"AlphanumComparator",
"/model/java/AlphanumComparator.jar" ) );
I tested this on Railo 4.0.4.001 using a CFML array of strings and the default java.text.Collator
so I believe it will work with your java.util.Comparator
implementation too.