tracker issue : CF-4203968

select a category, or use search below
(searches all categories and all time range)
Title:

Calling methods on JDK 8 interfaces does not work

| View in Tracker

Status/Resolution/Reason: To Fix//BugVerified

Reporter/Name(from Bugbase): Luis M. / ()

Created: 01/23/2019

Components: Java Integration

Versions: 2018

Failure Type: Others

Found In Build/Fixed In Build: all /

Priority/Frequency: Normal /

Locale/System: / Linux All

Vote Count: 9

Problem Description:
Java 8 allowed the ability to have default methods and static constructs on interfaces.  Allowing you to execute methods on them.  This does not work on ACF since 11 up to 2018, but works perfectly in Lucee.

Steps to Reproduce:

myRange = createObject( "java", "java.util.stream.IntStream" ).range(
				javaCast( "int", 1),
				javaCast( "int", 4 )
			).collect();


Actual Result:
The range method was not found.
Either there are no methods with the specified method name and argument types or the range method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments. If this is a Java object and you verified that the method exists, use the javacast function to reduce ambiguity.

Expected Result:
An array from 1 to 4

Any Workarounds:
NONE

Attachments:

Comments:

This is a big issue that blocks the use of stream interfaces with ACF. Please fix.
Comment by Matt G.
30147 | January 28, 2019 03:11:27 PM GMT
Adding my vote.
Vote by Peter F.
30149 | January 28, 2019 03:18:28 PM GMT
This limits what we can do with our cbstreams project.
Comment by Bradley W.
30148 | January 28, 2019 05:45:17 PM GMT
This limits any MODERN java library out there and core JDK libraries since JDK 8 (Released in 2014).
Comment by Luis M.
30151 | January 28, 2019 06:54:37 PM GMT