ListAsArray.containsAll() invokes List.contain() method instead of List.containsAll()

Description

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:

This looks like a bug to me. It would appear that it should be calling ist.containsAll(c) instead of ist.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.

Environment

None

Activity

Show:
Pothys - MitrahSoft
September 1, 2020, 4:38 PM

I've checked this ticket and the issue happened on lucee. So, I added a testcase and fix for this ticket.

Pull request: https://github.com/lucee/Lucee/pull/1015

Michael Offner
September 8, 2020, 1:17 AM

Pothys - MitrahSoft
September 8, 2020, 4:49 PM

, I made a test with fixed version 5.3.8.62-SNAPSHOT. It works fine as expected.

Fixed

Assignee

Michael Offner

Reporter

Dan Switzer, II

Priority

New

Labels

None

Fix versions

Sprint

5.3.8 Sprint 3

Affects versions