RFR 8139163: InstanceKlass::cast passes through NULL

Christian Thalinger christian.thalinger at oracle.com
Thu Oct 22 21:06:03 UTC 2015


> On Oct 22, 2015, at 10:05 AM, Coleen Phillimore <coleen.phillimore at oracle.com> wrote:
> 
> Summary: Reduce raw (InstanceKlass*) casts and InstanceKlass::cast, which no long allows null
> 
> Somewhat of a tedious thing to code review (sorry).   Tested with internal remote-build-and-test.
> 
> open webrev at http://cr.openjdk.java.net/~coleenp/8139163.01/

src/share/vm/memory/heapInspection.cpp

      const InstanceKlass* k = (InstanceKlass*)cie->klass();
!     Klass* super = ((InstanceKlass*)k)->java_super();
!     Klass* super = cie->klass()->super();

k is now unused and can be removed.

Otherwise this looks good.  Nice cleanup.

> bug link https://bugs.openjdk.java.net/browse/JDK-8139163.01
> 
> Thanks,
> Coleen



More information about the hotspot-dev mailing list