On Fri, 23 Apr 2021 15:03:42 GMT, Fairoz Matte <fma...@openjdk.org> wrote:
> findComponentType() logic is wrong. In findComponentType() method, We always > get vm.classesByName() retruns empty list > list = vm.classesByName(parser.typeName()); > We have "parser.typeName()" retruns " double[][]" > vm.classesByName("") is expecting the fully qualified name example > "java.lang.Double" > This always returns empty list, resulting into ClassNotLoadedException as it > assumes the Component class has not yet been loaded, hence the test case > fails. > > There was a suggested fix from Egor Ushakov from JetBrains, I am proposing > the same to get this fix. I have verified the patch with required testing it > works fine. src/jdk.jdi/share/classes/com/sun/tools/jdi/ArrayTypeImpl.java line 94: > 92: */ > 93: Type findComponentType(String signature) throws > ClassNotLoadedException { > 94: return findType(signature); Do we even need `findComponentType()` any more? Isn't `ReferenceTypeImpl.findType()` sufficient. The comment above `findComponentType()` is kind of explicit as to why it was needed. Are you sure none of that still applies, and there isn't some edge case that `findType()` is not covering? ------------- PR: https://git.openjdk.java.net/jdk/pull/3658