#fixed code
                                public void setMaxRows(int max) throws SQLException {
        //checkOpen();
        if (max < 0)
            throw new SQLException("max row count must be >= 0");
        rs.maxRows = max;
    }
#vulnerable code 
                                public void setMaxRows(int max) throws SQLException {
        checkOpen();
        if (max < 0)
            throw new SQLException("max row count must be >= 0");
        rs.maxRows = max;
    } 
                            #location 2 
                            #vulnerability type THREAD_SAFETY_VIOLATION