RFR: 8305714 : Add an extra test for JDK-8292755 [v2]

Weibing Xiao duke at openjdk.org
Fri Apr 28 16:20:26 UTC 2023


On Fri, 28 Apr 2023 15:35:00 GMT, Sean Coffey <coffeys at openjdk.org> wrote:

>> Weibing Xiao has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   modify bug id
>
> test/langtools/jdk/jshell/UndefinedClassTest.java line 26:
> 
>> 24: /**
>> 25:  * @test
>> 26:  * @bug 8305714
> 
> 8292755 would be the bug ID here since it refers to the product bug. 
> 
> Is there a reason why you couldn't fold this test into the test/langtools/jdk/jshell/ClassesTest.java test ?

Updated the bug ID.

Assuming ClassesTest is to verify the definition of Class.

With this patch, I can catch the following error message described in the attached file in JShell Console. 
![image](https://user-images.githubusercontent.com/66648564/235197717-bcc8e314-e7f3-4fa3-8431-95335717ab89.png)


Without the patch of 8292755 for JDK17,  JShell will crash with this test case. After applying this patch in JDK17U, JShell console will print something like below, 

Exception in thread "main" java.lang.InternalError: Exception during analyze - java.lang.AssertionError: isSubtype UNKNOWN
at jdk.jshell/jdk.jshell.TaskFactory$AnalyzeTask.analyze(TaskFactory.java:415)
at jdk.jshell/jdk.jshell.TaskFactory$AnalyzeTask.<init>(TaskFactory.java:406)
at jdk.jshell/jdk.jshell.TaskFactory.lambda$analyze$1(TaskFactory.java:178)
at jdk.jshell/jdk.jshell.TaskFactory.lambda$runTask$4(TaskFactory.java:213)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskPool.getTask(JavacTaskPool.java:193)
at jdk.jshell/jdk.jshell.TaskFactory.runTask(TaskFactory.java:206)
at jdk.jshell/jdk.jshell.TaskFactory.analyze(TaskFactory.java:175)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13719#discussion_r1180586234


More information about the kulla-dev mailing list