@Override
            public boolean hasMoreElements() {
                if (next != null) {
                    return true;
                }
                while (iter.hasNext()) {
                    NativeSslSession session = iter.next();
                    if (session.isValid()) {
                        next = session;
                        return true;
                    }
                }
                next = null;
                return false;
            }
This method is provided for API-compatibility only, not intended for use. No guarantees
are made WRT performance.
common/src/main/java/org/conscrypt/AbstractSessionContext.java