Skip to content

Commit

Permalink
Add a known issues section for Painless functional interace resolution (
Browse files Browse the repository at this point in the history
#81745)

This adds a known issues section for the Painless functional interface resolution bug (#81696). This is an issue in 7.16.0 and 7.16.1.
  • Loading branch information
jdconrad authored Dec 15, 2021
1 parent 3724fbe commit bd8ebbb
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions docs/reference/release-notes/7.16.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ related
https://discuss.elastic.co/t/apache-log4j2-remote-code-execution-rce-vulnerability-cve-2021-44228-esa-2021-31/291476[security
announcement].

[[known-issues-7.16.1]]
[discrete]
=== Known issues

include::7.16.asciidoc[tag=painless-functional-interface-resolution-81696-known-issue]

[[enhancement-7.16.1]]
[float]
=== Enhancements
Expand Down Expand Up @@ -130,6 +136,36 @@ Monitoring::
* Deprecate `create_legacy_templates` setting on HTTP exporters {es-pull}78564[#78564]
* Deprecate the monitoring ingest settings {es-pull}77659[#77659] (issue: {es-issue}77459[#77459])

[[known-issues-7.16.0]]
[discrete]
=== Known issues

// tag::painless-functional-interface-resolution-81696-known-issue[]
* Painless: Any Painless script where a method call resolves a lambda argument
to a `UnaryOperator` or a `BinaryOperator` type results in an
`IllegalArgumentException`. This exception results in a compilation error when
static types are used, or a runtime error for dynamic types. Use standard
procedural statements as a workaround, such as `if/else`, `while`, and `for`
statements.
+
The following example is a `UnaryOperator` type that will result in a failure:
+
[source,Java]
----
List l = ['abc', '123']; l.replaceAll(f -> f.replace('abc', 'doremi');
----
+
The following example is a possible workaround:
+
[source,Java]
----
List l = ['abc', '123'];
for (int i = 0; i < l.size(); ++i) {
l.set(i, l.get(i).replace('abc', 'doremi'));
}
----
// end::painless-functional-interface-resolution-81696-known-issue[]

[[feature-7.16.0]]
[float]
=== New features
Expand Down

0 comments on commit bd8ebbb

Please sign in to comment.