-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P2
-
Affects Version/s: 9, 10
-
Component/s: core-libs
-
b21
The below code snippet when compiled and run on JDK9, throws Assertion error.
StringConcatFactory.makeConcatWithConstants(lookup(), "name",
MethodType.methodType(String.class, String.class, String.class), "\1\2\1", (Integer)1);
Though method is intended as BSM for indyfying string concatenation, javac seems to never produce a recipe with non-string constants. But when used directly as an API, recipe can be provided any constants as per javadoc.
StringConcatFactory.makeConcatWithConstants(lookup(), "name",
MethodType.methodType(String.class, String.class, String.class), "\1\2\1", (Integer)1);
Though method is intended as BSM for indyfying string concatenation, javac seems to never produce a recipe with non-string constants. But when used directly as an API, recipe can be provided any constants as per javadoc.