title: not able to show data in Recycler View
body: <p>I am getting some data from server in json format. I have a model class where I got all data from server and I put all data in a Array List. Now I am not able to get data in recyclerView.</p>
  <p>MainActivity</p>
  <pre><code>public CopyOnWriteArrayList&lt;PrisonerModel&gt; inside1
  
   @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          recyclerViewInside = findViewById(R.id.rv);
  
   signature_calculation_prisonerList();
          new PrisonerListAsyncTask().execute(NetworkUtils.PRISONER_LIST, ctimestamp,
                  cnonce, cappkey, csign);
    inside1 = new CopyOnWriteArrayList&lt;&gt;();
          MyAdapter myAdapter = new MyAdapter(inside1, this, this);
          recyclerViewInside.setAdapter(myAdapter);
  }
  </code></pre>
  <p>Model.java file</p>
  <pre><code>public class PrisonerModel {
      private String name;
      private  int image;
      private  int total_prisoner;
      private int outside;
      private int inside;
   
      private String imageUri;
      private String device;
      
      public PrisonerModel() {
      }
  
      public PrisonerModel(String name, int image) {
          this.name = name;
          this.image = image;
      }
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public int getImage() {
          return image;
      }
  
      public void setImage(int image) {
          this.image = image;
      }
  
      public int getTotal_prisoner() {
          return total_prisoner;
      }
  
      public int getOutside() {
          return outside;
      }
  
      public int getInside() {
          return inside;
      }
  
    
  
      public String getImageUri() {
          return imageUri;
      }
  
      public String getDevice() {
          return device;
      }
  
      public static PrisonerModel fromJson(JSONObject jsonObject)
      {
          PrisonerModel pm1 = new PrisonerModel();
          MainActivity ma = new MainActivity();
          try {
              pm1.total_prisoner = jsonObject.getInt(&quot;total&quot;);
              Log.e(&quot;total: &quot;, String.valueOf(pm1.getTotal_prisoner()));
              JSONArray jsonArray = jsonObject.getJSONArray(&quot;list&quot;);
              ma.inside1 = pm1.fromJson(jsonArray);
              Log.e(&quot;inside: &quot;, String.valueOf(ma.inside1.get(0).getName()));
              pm1.inside = pm1.x;
              pm1.outside = pm1.getTotal_prisoner() - pm1.x;
  
          } catch (JSONException e) {
              e.printStackTrace();
              return null;
          }
          return pm1;
      }
  </code></pre>
  <p>I am getting data of inside1 in this model class but when I use Log.e(&quot;&quot;) in Main Activity it throw error &quot;ArrayOutOfBoundIndex&quot;</p>
  <p>could you help me where am i doing mistake?</p>