Painless: Disable java-9 indy string thing

It is breaking some of the doc tests. Also add a unit test that
shows the failure.

Relates to #18929
This commit is contained in:
Nik Everett 2016-06-16 15:06:01 -04:00
parent b665d8a187
commit 13d16fbf41
2 changed files with 5 additions and 1 deletions

View File

@ -131,7 +131,7 @@ public final class WriterConstants {
// not Java 9 - we set it null, so MethodWriter uses StringBuilder:
bs = null;
}
INDY_STRING_CONCAT_BOOTSTRAP_HANDLE = bs;
INDY_STRING_CONCAT_BOOTSTRAP_HANDLE = null; // Disabled until https://github.com/elastic/elasticsearch/issues/18929
}
public final static int MAX_INDY_STRING_CONCAT_ARGS = 200;

View File

@ -221,4 +221,8 @@ public class StringTests extends ScriptTestCase {
exec("def x = null; def y = null; x += y");
});
}
public void testAppendStringIntoMap() {
assertEquals("nullcat", exec("def a = new HashMap(); a.cat += 'cat'"));
}
}