Fixed
Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Dan Switzer, II
Dan Switzer, IIPriority
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
None
Affects versions
Created 28 August 2020 at 17:34
Updated 8 September 2020 at 06:49
Resolved 8 September 2020 at 06:49
I'm working on porting some ACF code to Lucee. This code uses the (non-supported) containsAll() member method on arrays to check if all the items from array1 exist in array2.
In Lucee, I noticed the method exists, but returns the wrong values.
Looking at the Lucee source code, I see that the ListAsArray.java implements the
containsAll()
method as:@Override public boolean containsAll(java.util.Collection c) { return list.contains(c); }
This looks like a bug to me. It would appear that it should be calling
ist.containsAll(c)
instead ofist.contains(c)
.Here's a Gist that shows of the issue:
https://www.trycf.com/gist/dbcf1cc8f40f1a50711644ecfc7c45ab/
In ACF10+ the code returns true, where in Lucee 5 it returns false.