#fixed code
                                HTTP1ServerConnection(HTTP2Configuration config, Session tcpSession, SecureSession secureSession,
                          HTTP1ServerRequestHandler requestHandler, ServerSessionListener serverSessionListener) {
        super(config, secureSession, tcpSession, requestHandler, null);
        requestHandler.connection = this;
        this.serverSessionListener = serverSessionListener;
        this.serverRequestHandler = requestHandler;
    }
#vulnerable code 
                                boolean directUpgradeHTTP2(MetaData.Request request) {
        if (HttpMethod.PRI.is(request.getMethod())) {
            HTTP2ServerConnection http2ServerConnection = new HTTP2ServerConnection(config, tcpSession, secureSession,
                    serverSessionListener);
            tcpSession.attachObject(http2ServerConnection);
            http2ServerConnection.getParser().directUpgrade();
            upgradeHTTP2Successfully = true;
            return true;
        } else {
            return false;
        }
    } 
                            #location 3 
                            #vulnerability type THREAD_SAFETY_VIOLATION