-
Bug
-
Resolution: Fixed
-
P4
-
9
-
b131
-
Verified
This problem has been discovered in the context of Valhalla. Altering the way in which inner classes are laid out inside the InnerClasses attribute results in visible changes in the way jshell suggests completions.
The attached test case reproduces the problem without valhalla - a simple JDK 9 repo is required to compile and run the test.
The test attempts to list all elements available from the scope of a fake class which imports java.util.concurrent; surprisingly, the following members are also returned:
java.util.concurrent.CompletableFuture.AsynchronousCompletionTask
java.lang.Thread.State
java.lang.ProcessBuilder.Redirect.Type
java.lang.Character.UnicodeScript
java.lang.Character.UnicodeBlock
java.lang.Character.Subset
These are nested classes and should not be listed.
If the list process is repeated twice, the problem disappears.
The attached test case reproduces the problem without valhalla - a simple JDK 9 repo is required to compile and run the test.
The test attempts to list all elements available from the scope of a fake class which imports java.util.concurrent; surprisingly, the following members are also returned:
java.util.concurrent.CompletableFuture.AsynchronousCompletionTask
java.lang.Thread.State
java.lang.ProcessBuilder.Redirect.Type
java.lang.Character.UnicodeScript
java.lang.Character.UnicodeBlock
java.lang.Character.Subset
These are nested classes and should not be listed.
If the list process is repeated twice, the problem disappears.