Skip to content

Commit 6663e24

Browse files
committed
Merge remote-tracking branch 'es/6.x' into ccr-6.x
* es/6.x: (24 commits) Fix broken backport Switch full-cluster-restart to new style Requests (#32140) Fix multi level nested sort (#32204) MINOR: Remove unused `IndexDynamicSettings` (#32237) (#32248) [Tests] Remove QueryStringQueryBuilderTests#toQuery class assertions (#32236) Switch rolling restart to new style Requests (#32147) Enhance Parent circuit breaker error message (#32056) [ML] Use default request durability for .ml-state index (#32233) Enable testing in FIPS140 JVM (#31666) (#32231) Remove indices stats timeout from monitoring docs TESTS: Check for Netty resource leaks (#31861) (#32225) Rename ranking evaluation response section (#32166) Dependencies: Upgrade to joda time 2.10 (#32160) Backport SSL context names (#30953) to 6.x (#32223) Require Gradle 4.9 as minimum version (#32200) Detect old trial licenses and mimic behaviour (#32209) Painless: Simplify Naming in Lookup Package (#32177) add support for write index resolution when creating/updating documents (#31520) A replica can be promoted and started in one cluster state update (#32042) Rest test - allow for snapshots to take 0 milliseconds ...
2 parents 9174493 + f98ebb2 commit 6663e24

File tree

195 files changed

+4532
-2018
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

195 files changed

+4532
-2018
lines changed

buildSrc/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ plugins {
2525

2626
group = 'org.elasticsearch.gradle'
2727

28-
if (GradleVersion.current() < GradleVersion.version('3.3')) {
29-
throw new GradleException('Gradle 3.3+ is required to build elasticsearch')
28+
if (GradleVersion.current() < GradleVersion.version('4.9')) {
29+
throw new GradleException('Gradle 4.9+ is required to build elasticsearch')
3030
}
3131

3232
if (JavaVersion.current() < JavaVersion.VERSION_1_8) {

buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy

+3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ class BuildPlugin implements Plugin<Project> {
6767
+ 'elasticearch.standalone-rest-test, and elasticsearch.build '
6868
+ 'are mutually exclusive')
6969
}
70+
if (GradleVersion.current() < GradleVersion.version('4.9')) {
71+
throw new GradleException('Gradle 4.9+ is required to use elasticsearch.build plugin')
72+
}
7073
project.pluginManager.apply('java')
7174
project.pluginManager.apply('carrotsearch.randomized-testing')
7275
// these plugins add lots of info to our jars

buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/PluginBuildPlugin.groovy

+7-29
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ public class PluginBuildPlugin extends BuildPlugin {
7575
// and generate a different pom for the zip
7676
addClientJarPomGeneration(project)
7777
addClientJarTask(project)
78-
} else {
79-
// no client plugin, so use the pom file from nebula, without jar, for the zip
80-
project.ext.set("nebulaPublish.maven.jar", false)
8178
}
79+
// while the jar isn't normally published, we still at least build a pom of deps
80+
// in case it is published, for instance when other plugins extend this plugin
81+
configureJarPom(project)
8282

8383
project.integTestCluster.dependsOn(project.bundlePlugin)
8484
project.tasks.run.dependsOn(project.bundlePlugin)
@@ -92,7 +92,6 @@ public class PluginBuildPlugin extends BuildPlugin {
9292
}
9393

9494
if (isModule == false || isXPackModule) {
95-
addZipPomGeneration(project)
9695
addNoticeGeneration(project)
9796
}
9897

@@ -237,36 +236,15 @@ public class PluginBuildPlugin extends BuildPlugin {
237236
}
238237
}
239238

240-
/** Adds a task to generate a pom file for the zip distribution. */
241-
public static void addZipPomGeneration(Project project) {
239+
/** Configure the pom for the main jar of this plugin */
240+
protected static void configureJarPom(Project project) {
242241
project.plugins.apply(ScmInfoPlugin.class)
243242
project.plugins.apply(MavenPublishPlugin.class)
244243

245244
project.publishing {
246245
publications {
247-
zip(MavenPublication) {
248-
artifact project.bundlePlugin
249-
}
250-
/* HUGE HACK: the underlying maven publication library refuses to deploy any attached artifacts
251-
* when the packaging type is set to 'pom'. But Sonatype's OSS repositories require source files
252-
* for artifacts that are of type 'zip'. We already publish the source and javadoc for Elasticsearch
253-
* under the various other subprojects. So here we create another publication using the same
254-
* name that has the "real" pom, and rely on the fact that gradle will execute the publish tasks
255-
* in alphabetical order. This lets us publish the zip file and even though the pom says the
256-
* type is 'pom' instead of 'zip'. We cannot setup a dependency between the tasks because the
257-
* publishing tasks are created *extremely* late in the configuration phase, so that we cannot get
258-
* ahold of the actual task. Furthermore, this entire hack only exists so we can make publishing to
259-
* maven local work, since we publish to maven central externally. */
260-
zipReal(MavenPublication) {
261-
artifactId = project.pluginProperties.extension.name
262-
pom.withXml { XmlProvider xml ->
263-
Node root = xml.asNode()
264-
root.appendNode('name', project.pluginProperties.extension.name)
265-
root.appendNode('description', project.pluginProperties.extension.description)
266-
root.appendNode('url', urlFromOrigin(project.scminfo.origin))
267-
Node scmNode = root.appendNode('scm')
268-
scmNode.appendNode('url', project.scminfo.origin)
269-
}
246+
nebula(MavenPublication) {
247+
artifactId project.pluginProperties.extension.name
270248
}
271249
}
272250
}

buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterConfiguration.groovy

+7
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ class ClusterConfiguration {
142142
// there are cases when value depends on task that is not executed yet on configuration stage
143143
Map<String, Object> systemProperties = new HashMap<>()
144144

145+
Map<String, Object> environmentVariables = new HashMap<>()
146+
145147
Map<String, Object> settings = new HashMap<>()
146148

147149
Map<String, String> keystoreSettings = new HashMap<>()
@@ -164,6 +166,11 @@ class ClusterConfiguration {
164166
systemProperties.put(property, value)
165167
}
166168

169+
@Input
170+
void environment(String variable, Object value) {
171+
environmentVariables.put(variable, value)
172+
}
173+
167174
@Input
168175
void setting(String name, Object value) {
169176
settings.put(name, value)

buildSrc/src/main/groovy/org/elasticsearch/gradle/test/NodeInfo.groovy

+1
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ class NodeInfo {
181181

182182
args.addAll("-E", "node.portsfile=true")
183183
env = [:]
184+
env.putAll(config.environmentVariables)
184185
for (Map.Entry<String, String> property : System.properties.entrySet()) {
185186
if (property.key.startsWith('tests.es.')) {
186187
args.add("-E")

client/rest-high-level/src/test/java/org/elasticsearch/client/RankEvalIT.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
import java.util.stream.Collectors;
4141
import java.util.stream.Stream;
4242

43-
import static org.elasticsearch.index.rankeval.EvaluationMetric.filterUnknownDocuments;
43+
import static org.elasticsearch.index.rankeval.EvaluationMetric.filterUnratedDocuments;
4444

4545
public class RankEvalIT extends ESRestHighLevelClientTestCase {
4646

@@ -85,7 +85,7 @@ public void testRankEvalRequest() throws IOException {
8585
Map<String, EvalQueryQuality> partialResults = response.getPartialResults();
8686
assertEquals(2, partialResults.size());
8787
EvalQueryQuality amsterdamQueryQuality = partialResults.get("amsterdam_query");
88-
assertEquals(2, filterUnknownDocuments(amsterdamQueryQuality.getHitsAndRatings()).size());
88+
assertEquals(2, filterUnratedDocuments(amsterdamQueryQuality.getHitsAndRatings()).size());
8989
List<RatedSearchHit> hitsAndRatings = amsterdamQueryQuality.getHitsAndRatings();
9090
assertEquals(7, hitsAndRatings.size());
9191
for (RatedSearchHit hit : hitsAndRatings) {
@@ -97,7 +97,7 @@ public void testRankEvalRequest() throws IOException {
9797
}
9898
}
9999
EvalQueryQuality berlinQueryQuality = partialResults.get("berlin_query");
100-
assertEquals(6, filterUnknownDocuments(berlinQueryQuality.getHitsAndRatings()).size());
100+
assertEquals(6, filterUnratedDocuments(berlinQueryQuality.getHitsAndRatings()).size());
101101
hitsAndRatings = berlinQueryQuality.getHitsAndRatings();
102102
assertEquals(7, hitsAndRatings.size());
103103
for (RatedSearchHit hit : hitsAndRatings) {

client/rest/build.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ forbiddenApisMain {
5959
PrecommitTasks.getResource('/forbidden/http-signatures.txt')]
6060
}
6161

62+
forbiddenPatterns {
63+
exclude '**/*.der'
64+
}
65+
6266
forbiddenApisTest {
6367
//we are using jdk-internal instead of jdk-non-portable to allow for com.sun.net.httpserver.* usage
6468
bundledSignatures -= 'jdk-non-portable'

client/rest/src/test/java/org/elasticsearch/client/RestClientBuilderIntegTests.java

+19-5
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@
3535
import java.io.InputStream;
3636
import java.net.InetAddress;
3737
import java.net.InetSocketAddress;
38+
import java.nio.file.Files;
39+
import java.nio.file.Paths;
40+
import java.security.KeyFactory;
3841
import java.security.KeyStore;
42+
import java.security.cert.Certificate;
43+
import java.security.cert.CertificateFactory;
44+
import java.security.spec.PKCS8EncodedKeySpec;
3945

4046
import static org.hamcrest.Matchers.containsString;
4147
import static org.junit.Assert.assertEquals;
@@ -103,12 +109,20 @@ private RestClient buildRestClient() {
103109

104110
private static SSLContext getSslContext() throws Exception {
105111
SSLContext sslContext = SSLContext.getInstance("TLS");
106-
try (InputStream in = RestClientBuilderIntegTests.class.getResourceAsStream("/testks.jks")) {
107-
KeyStore keyStore = KeyStore.getInstance("JKS");
108-
keyStore.load(in, "password".toCharArray());
109-
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
112+
try (InputStream certFile = RestClientBuilderIntegTests.class.getResourceAsStream("/test.crt")) {
113+
// Build a keystore of default type programmatically since we can't use JKS keystores to
114+
// init a KeyManagerFactory in FIPS 140 JVMs.
115+
KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
116+
keyStore.load(null, "password".toCharArray());
117+
CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
118+
PKCS8EncodedKeySpec privateKeySpec = new PKCS8EncodedKeySpec(Files.readAllBytes(Paths.get(RestClientBuilderIntegTests.class
119+
.getResource("/test.der").toURI())));
120+
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
121+
keyStore.setKeyEntry("mykey", keyFactory.generatePrivate(privateKeySpec), "password".toCharArray(),
122+
new Certificate[]{certFactory.generateCertificate(certFile)});
123+
KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
110124
kmf.init(keyStore, "password".toCharArray());
111-
TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
125+
TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
112126
tmf.init(keyStore);
113127
sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
114128
}
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
-----BEGIN CERTIFICATE-----
2+
MIIEATCCAumgAwIBAgIEObhDZDANBgkqhkiG9w0BAQsFADBnMQswCQYDVQQGEwJV
3+
UzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxEDAOBgNVBAoT
4+
B2VsYXN0aWMxDTALBgNVBAsTBHRlc3QxEjAQBgNVBAMTCXRlc3Qgbm9kZTAeFw0x
5+
NzA3MTcxNjEyNTZaFw0yNzA3MTUxNjEyNTZaMGcxCzAJBgNVBAYTAlVTMQswCQYD
6+
VQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHZWxhc3Rp
7+
YzENMAsGA1UECxMEdGVzdDESMBAGA1UEAxMJdGVzdCBub2RlMIIBIjANBgkqhkiG
8+
9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnXtuGIgAq6vWzUD34HXkYF+0u103hb8d1h35
9+
kjeuNApkUhS6x/VbuNp7TpWmprfDgG5w9TourHvyiqcQMDEWrBunS6rmKo1jK1Wm
10+
le3qA3F2l9VIZSNeeYQgezmzuElEPPmBjN8XBByIWKYjZcGd5u7DiquPUh9QLIev
11+
itgB2jfi9D8ewyvaSbVAQuQwyIaDN9L74wKyMC8EuzzAWNSDjgIhhwcR5qg17msa
12+
ItyM44/3hik+ObIGpMlLSxQu2V1U9bOaq48JjQBLHVg1vzC9VzGuNdEb8haFnhJN
13+
UrdESdHymbtBSUvy30iB+kHq5R8wQ4pC+WxChQnbA2GskuFrMQIDAQABo4G0MIGx
14+
MIGPBgNVHREEgYcwgYSHBH8AAAGHEAAAAAAAAAAAAAAAAAAAAAGCCWxvY2FsaG9z
15+
dIIVbG9jYWxob3N0LmxvY2FsZG9tYWluggpsb2NhbGhvc3Q0ghdsb2NhbGhvc3Q0
16+
LmxvY2FsZG9tYWluNIIKbG9jYWxob3N0NoIXbG9jYWxob3N0Ni5sb2NhbGRvbWFp
17+
bjYwHQYDVR0OBBYEFFwNcqIKfGBCBGo9faQJ3TsHmp0SMA0GCSqGSIb3DQEBCwUA
18+
A4IBAQBvUJTRjSOf/+vtyS3OokwRilg1ZGF3psg0DWhjH2ehIRfNibU1Y8FVQo3I
19+
VU8LjcIUK1cN85z+AsYqLXo/C4qmJPydQ1tGpQL7uIrPD4h+Xh3tY6A2DKRJRQFO
20+
w2LjswPidGufMztpPbXxLREqvkvn80VkDnc44UPxYfHvZFqYwYyxZccA5mm+BhYu
21+
IerjfvgX+8zMWIQZOd+jRq8EaVTmVK2Azwwhc5ImWfc0DA3pmGPdECzE4N0VVoIJ
22+
N8PCVltXXP3F7K3LoT6CLSiJ3c/IDVNoVS4pRV6R6Y4oIKD9T/T1kAgAvOrUGRWY
23+
ejWQ41GdUmkmxrqCaMbVCO4s72BC
24+
-----END CERTIFICATE-----
1.19 KB
Binary file not shown.

distribution/tools/plugin-cli/src/test/java/org/elasticsearch/plugins/InstallPluginCommandTests.java

+6
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
import org.elasticsearch.test.PosixPermissionsResetter;
6262
import org.junit.After;
6363
import org.junit.Before;
64+
import org.junit.BeforeClass;
6465

6566
import java.io.BufferedReader;
6667
import java.io.ByteArrayInputStream;
@@ -139,6 +140,11 @@ public InstallPluginCommandTests(FileSystem fs, Function<String, Path> temp) {
139140
System.setProperty("java.io.tmpdir", temp.apply("tmpdir").toString());
140141
}
141142

143+
@BeforeClass
144+
public static void testIfFipsMode() {
145+
assumeFalse("Can't run in a FIPS JVM because this depends on BouncyCastle (non-fips)", inFipsJvm());
146+
}
147+
142148
@Override
143149
@Before
144150
public void setUp() throws Exception {

docs/plugins/repository-s3.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ include::install_remove.asciidoc[]
1313
==== Getting started with AWS
1414

1515
The plugin provides a repository type named `s3` which may be used when creating a repository.
16-
The repository defaults to using
17-
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html[IAM Role]
16+
The repository defaults to using https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html[ECS IAM Role] or
17+
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html[EC2 IAM Role]
1818
credentials for authentication. The only mandatory setting is the bucket name:
1919

2020
[source,js]

docs/reference/modules/transport.asciidoc

+7-4
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ It also uses the common
5959
[float]
6060
==== TCP Transport Profiles
6161

62-
Elasticsearch allows you to bind to multiple ports on different interfaces by the use of transport profiles. See this example configuration
62+
Elasticsearch allows you to bind to multiple ports on different interfaces by
63+
the use of transport profiles. See this example configuration
6364

6465
[source,yaml]
6566
--------------
@@ -71,10 +72,12 @@ transport.profiles.dmz.port: 9700-9800
7172
transport.profiles.dmz.bind_host: 172.16.1.2
7273
--------------
7374

74-
The `default` profile is a special. It is used as fallback for any other profiles, if those do not have a specific configuration setting set.
75-
Note that the default profile is how other nodes in the cluster will connect to this node usually. In the future this feature will allow to enable node-to-node communication via multiple interfaces.
75+
The `default` profile is special. It is used as a fallback for any other
76+
profiles, if those do not have a specific configuration setting set, and is how
77+
this node connects to other nodes in the cluster.
7678

77-
The following parameters can be configured like that
79+
The following parameters can be configured on each transport profile, as in the
80+
example above:
7881

7982
* `port`: The port to bind to
8083
* `bind_host`: The host to bind

docs/reference/search/rank-eval.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ that shows potential errors of individual queries. The response has the followin
278278
"details": {
279279
"my_query_id1": { <2>
280280
"quality_level": 0.6, <3>
281-
"unknown_docs": [ <4>
281+
"unrated_docs": [ <4>
282282
{
283283
"_index": "my_index",
284284
"_id": "1960795"
@@ -313,7 +313,7 @@ that shows potential errors of individual queries. The response has the followin
313313
<1> the overall evaluation quality calculated by the defined metric
314314
<2> the `details` section contains one entry for every query in the original `requests` section, keyed by the search request id
315315
<3> the `quality_level` in the `details` section shows the contribution of this query to the global quality score
316-
<4> the `unknown_docs` section contains an `_index` and `_id` entry for each document in the search result for this
316+
<4> the `unrated_docs` section contains an `_index` and `_id` entry for each document in the search result for this
317317
query that didn't have a ratings value. This can be used to ask the user to supply ratings for these documents
318318
<5> the `hits` section shows a grouping of the search results with their supplied rating
319319
<6> the `metric_details` give additional information about the calculated quality metric (e.g. how many of the retrieved

docs/reference/settings/monitoring-settings.asciidoc

-4
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@ You can update this setting through the
8484

8585
Sets the timeout for collecting index statistics. Defaults to `10s`.
8686

87-
`xpack.monitoring.collection.indices.stats.timeout`::
88-
89-
Sets the timeout for collecting total indices statistics. Defaults to `10s`.
90-
9187
`xpack.monitoring.collection.index.recovery.active_only`::
9288

9389
Controls whether or not all recoveries are collected. Set to `true` to

modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/DateProcessorTests.java

+2
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ public void testInvalidJodaPattern() {
114114
}
115115

116116
public void testJodaPatternLocale() {
117+
//TODO investigate if this is a bug in Joda
118+
assumeFalse("Can't run in a FIPS JVM, Joda parse date error", inFipsJvm());
117119
DateProcessor dateProcessor = new DateProcessor(randomAlphaOfLength(10),
118120
templatize(ZoneId.of("Europe/Amsterdam")), templatize(Locale.ITALIAN),
119121
"date_as_string", Collections.singletonList("yyyy dd MMM"), "date_as_date");

modules/lang-painless/src/main/java/org/elasticsearch/painless/AnalyzerCaster.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ public static PainlessCast getLegalCast(Location location, Class<?> actual, Clas
466466
return PainlessCast.standard(actual, expected, explicit);
467467
} else {
468468
throw location.createError(new ClassCastException("Cannot cast from " +
469-
"[" + PainlessLookupUtility.anyTypeToPainlessTypeName(actual) + "] to " +
470-
"[" + PainlessLookupUtility.anyTypeToPainlessTypeName(expected) + "]."));
469+
"[" + PainlessLookupUtility.typeToCanonicalTypeName(actual) + "] to " +
470+
"[" + PainlessLookupUtility.typeToCanonicalTypeName(expected) + "]."));
471471
}
472472
}
473473

modules/lang-painless/src/main/java/org/elasticsearch/painless/Def.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ static MethodHandle lookupMethod(PainlessLookup painlessLookup, MethodHandles.Lo
302302
nestedType,
303303
0,
304304
DefBootstrap.REFERENCE,
305-
PainlessLookupUtility.anyTypeToPainlessTypeName(interfaceType));
305+
PainlessLookupUtility.typeToCanonicalTypeName(interfaceType));
306306
filter = nested.dynamicInvoker();
307307
} else {
308308
throw new AssertionError();
@@ -334,7 +334,7 @@ static MethodHandle lookupReference(PainlessLookup painlessLookup, MethodHandles
334334
int arity = interfaceMethod.arguments.size();
335335
PainlessMethod implMethod = lookupMethodInternal(painlessLookup, receiverClass, name, arity);
336336
return lookupReferenceInternal(painlessLookup, methodHandlesLookup, interfaceType,
337-
PainlessLookupUtility.anyTypeToPainlessTypeName(implMethod.target), implMethod.name, receiverClass);
337+
PainlessLookupUtility.typeToCanonicalTypeName(implMethod.target), implMethod.name, receiverClass);
338338
}
339339

340340
/** Returns a method handle to an implementation of clazz, given method reference signature. */
@@ -347,7 +347,7 @@ private static MethodHandle lookupReferenceInternal(PainlessLookup painlessLooku
347347
PainlessMethod interfaceMethod = painlessLookup.getPainlessStructFromJavaClass(clazz).functionalMethod;
348348
if (interfaceMethod == null) {
349349
throw new IllegalArgumentException("Cannot convert function reference [" + type + "::" + call + "] " +
350-
"to [" + PainlessLookupUtility.anyTypeToPainlessTypeName(clazz) + "], not a functional interface");
350+
"to [" + PainlessLookupUtility.typeToCanonicalTypeName(clazz) + "], not a functional interface");
351351
}
352352
int arity = interfaceMethod.arguments.size() + captures.length;
353353
final MethodHandle handle;

modules/lang-painless/src/main/java/org/elasticsearch/painless/FunctionRef.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ private static PainlessMethod lookup(PainlessLookup painlessLookup, Class<?> exp
168168
PainlessMethod method = painlessLookup.getPainlessStructFromJavaClass(expected).functionalMethod;
169169
if (method == null) {
170170
throw new IllegalArgumentException("Cannot convert function reference [" + type + "::" + call + "] " +
171-
"to [" + PainlessLookupUtility.anyTypeToPainlessTypeName(expected) + "], not a functional interface");
171+
"to [" + PainlessLookupUtility.typeToCanonicalTypeName(expected) + "], not a functional interface");
172172
}
173173

174174
// lookup requested method

modules/lang-painless/src/main/java/org/elasticsearch/painless/Locals.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ public int getSlot() {
292292
@Override
293293
public String toString() {
294294
StringBuilder b = new StringBuilder();
295-
b.append("Variable[type=").append(PainlessLookupUtility.anyTypeToPainlessTypeName(clazz));
295+
b.append("Variable[type=").append(PainlessLookupUtility.typeToCanonicalTypeName(clazz));
296296
b.append(",name=").append(name);
297297
b.append(",slot=").append(slot);
298298
if (readonly) {

0 commit comments

Comments
 (0)