RFR: 8325936: jshell - crash on 'new Object().""'

Andrey Turbanov aturbanov at openjdk.org
Mon Mar 11 18:16:54 UTC 2024


On Thu, 15 Feb 2024 16:55:31 GMT, Hannes Greule <hgreule at openjdk.org> wrote:

> This fixes a crash in jshell when the target of a StringTemplate is not a processor. We only look up the `process` method if the type is actually a processor. The added test case fails without that fix.
> 
> Please let me know what you think of this fix, and if there are things that should be changed.

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java line 4482:

> 4480:         Type interfaceType = types.asSuper(processorType, syms.processorType.tsym);
> 4481: 
> 4482:         if (interfaceType == null)  {

Suggestion:

        if (interfaceType == null) {

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17876#discussion_r1520210961


More information about the compiler-dev mailing list