package com.antew.redditinpictures.library.reddit;

import java.util.List;

public class MySubreddits {
    String kind;
    Data   data;

    public String getKind() {
        return kind;
    }

    public Data getData() {
        return data;
    }

    public static class Data {
        String         modhash;
        List<Children> children;
        String         after;
        String         before;

        public void addChildren(List<Children> children) {
            this.children.addAll(children);
        }

        public String getModhash() {
            return modhash;
        }

        public List<Children> getChildren() {
            return children;
        }

        public void setAfter(String after) {
            this.after = after;
        }

        public void setBefore(String before) {
            this.before = before;
        }

        public String getAfter() {
            return after;
        }

        public String getBefore() {
            return before;
        }

    }

    public static class Children {
        String        kind;
        SubredditData data;

        public String getKind() {
            return kind;
        }

        public SubredditData getData() {
            return data;
        }

    }

    public static class SubredditData {
        String  display_name;
        String  description;
        String  name;
        long    created;
        String  url;
        String  title;
        long    created_utc;
        String  public_description;
        int[]   header_size;
        boolean over18;
        int     subscribers;
        String  header_title;
        String  id;
        String  header_img;

        public String getDisplay_name() {
            return display_name;
        }

        public String getDescription() {
            return description;
        }

        public String getName() {
            return name;
        }

        public long getCreated() {
            return created;
        }

        public String getUrl() {
            return url;
        }

        public String getTitle() {
            return title;
        }

        public long getCreated_utc() {
            return created_utc;
        }

        public String getPublic_description() {
            return public_description;
        }

        public int[] getHeader_size() {
            return header_size;
        }

        public boolean isOver18() {
            return over18;
        }

        public int getSubscribers() {
            return subscribers;
        }

        public String getHeader_title() {
            return header_title;
        }

        public String getId() {
            return id;
        }

        public String getHeader_img() {
            return header_img;
        }

    }
}

@@ -45,16 +45,44 @@
 eddit;%0A%0A
+import java.util.ArrayList;%0A
 import j
@@ -487,24 +487,148 @@
 children) %7B%0A
+            if (this.children == null)%0A                this.children = new ArrayList%3CMySubreddits.Children%3E();%0A            %0A
             

Fix item flagged by FindBugs.