RFR: 8221503: vmTestbase/nsk/jdb/eval/eval001/eval001.java fails with: com.sun.jdi.InvalidTypeException: Can't assign double[][][] to double[][][]

Chris Plummer cjplummer at openjdk.java.net
Thu Apr 29 04:34:52 UTC 2021


On Wed, 28 Apr 2021 07:57:03 GMT, Fairoz Matte <fmatte at openjdk.org> wrote:

> > Do we even need findComponentType() any more? Isn't ReferenceTypeImpl.findType() sufficient.
> 
> We still need findComponentType(),
> Difference between findType() and findComponentType() is that, findComponentType() tries to get the list of ReferenceType from the "vm.classesByName". In case list is empty, it explicitly throws ClassNotLoadedException.
> This exception check is required in validateAssignment(ValueContainer destination) call from ObjectReferenceImpl.java.

I'm not sure what you mean by this. After your changes, this is all `findComponentType()` does:


    Type findComponentType(String signature) throws ClassNotLoadedException {
        return findType(signature);
    }


And `findType()` has the exact same signature, including the `throws`:

`    Type findType(String signature) throws ClassNotLoadedException {`


So my suggestion is to get rid of `findComponentType()` and just have current users call `findType()` instead.

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

PR: https://git.openjdk.java.net/jdk/pull/3658


More information about the serviceability-dev mailing list