Skip to content

Painless: Failed resolution of subclasses of functional interfaces #81696

Description

@stu-elastic

After 7.15, class structure lookup was changed. This impacted functional
interfaces that define apply in their super classes such as BinaryOperator.

Reproduction:

[1, 2].stream().reduce((i1, i2) -> i1).orElse(0)

Will trigger an illegal_argument_exception due to Cannot pass lambda to [java.util.function.BinaryOperator], not a functional interface.

From: https://discuss.elastic.co/t/regression-painless-script-fails-for-binaryoperator-lamdba/291714

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions