public List ownedMonitors()

in core/src/main/java/com/jetbrains/sa/jdi/ThreadReferenceImpl.java [180:202]


    public List<ObjectReferenceImpl> ownedMonitors()  throws IncompatibleThreadStateException {
        if (!vm().canGetOwnedMonitorInfo()) {
            throw new UnsupportedOperationException();
        }

        if (myJavaThread == null) {
           throw new IncompatibleThreadStateException();
        }

        if (ownedMonitors != null) {
            return ownedMonitors;
        }

        ownedMonitorsWithStackDepth();

        for (MonitorInfoImpl monitorInfo : ownedMonitorsInfo) {
            //FIXME : Change the MonitorInfoImpl cast to com.sun.jdi.MonitorInfo
            //        when hotspot start building with jdk1.6.
            ownedMonitors.add(monitorInfo.monitor());
        }

        return ownedMonitors;
    }