@Override
    public final SSLSession getSession(byte[] sessionId) {
        if (sessionId == null) {
            throw new NullPointerException("sessionId");
        }
        ByteArray key = new ByteArray(sessionId);
        NativeSslSession session;
        synchronized (sessions) {
            session = sessions.get(key);
        }
        if (session != null && session.isValid()) {
            return session.toSSLSession();
        }
        return null;
    }
This is provided for API-compatibility only, not intended for use. No guarantees are
made WRT performance or the validity of the returned session.
common/src/main/java/org/conscrypt/AbstractSessionContext.java