On Wed, 28 Apr 2021 07:57:03 GMT, Fairoz Matte <fma...@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

Reply via email to