8145371: ClassCastException thrown in LambdaFormEditor.getInCache

Read field into local to avoid customization race

Reviewed-by: vlivanov, jrose, psandoz
This commit is contained in:
Martin Buchholz 2018-01-03 13:17:35 -08:00
parent 46c4af28a4
commit 7838184968

View file

@ -1667,6 +1667,7 @@ assertEquals("[three, thee, tee]", asListFix.invoke((Object)argv).toString());
/** Craft a LambdaForm customized for this particular MethodHandle */
/*non-public*/
void customize() {
final LambdaForm form = this.form;
if (form.customized == null) {
LambdaForm newForm = form.customize(this);
updateForm(newForm);