Q:

ConcurrentModificationException when inserting data to Room Db

I'm basically try to save a volley response in my room db so I can later retrieve it for offline usage, but every time I start my app, I get this exception and I did try many things to solve it but nothing worked for me, any help would be appreciated guys.  Thank you. 
String api_keys = "MyApiKey" + awayid;

JsonObjectRequest jsonObjectRequest2 = new JsonObjectRequest(Request. Method. GET, api_keys, null, new Response. Listener<JSONObject>() {
               @Override
               public void onResponse(JSONObject response) {
                   try {
                       JSONArray jsonArray2 = response.getJSONArray("teams");

                       for (int i = 0; i < jsonArray2.length(); i++) {

                           JSONObject jsonObject2 = jsonArray2.getJSONObject(i);

                           String awaylogo = jsonObject2.getString("strTeamBadge");

                           modelList.add(new Model(eventid,myround, date, hometeam, awayteam, homelogo, awaylogo, homescore, 
      awayscore, stadium, "Details", mytime));

                           new Thread(new Runnable() {
                               @Override
                               public void run() {

                                   ApplicationDatabase database = DatabaseClient.getInstance(getApplicationContext()).getApplicationDatabase();

                               database.modelDao().insert(modelList); /// here it is the problem in this line

                              }
                          }).start();
                      } 
                  } catch (JSONException e) {
                      e.printStackTrace();
                  }
              }
          }, error -> {});

*** This is my Dao 
@Dao
public interface  modelDAO {

    @Query("SELECT * FROM Model ")
    List<Model> listAll();

    @Insert(onConflict = OnConflictStrategy. REPLACE)
    void insert(List<Model> model);

}

A:

The solution was actually passing a model object to my room db instead of list of model , so hope this answer helps someone else .