From c84041327cbac8d67fd75ff4c223cf43f7fc73e7 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 8 Feb 2016 21:15:49 +0300 Subject: cleanup --- src/main/java/com/juick/Message.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/juick/Message.java b/src/main/java/com/juick/Message.java index c6e10214..10f7c698 100644 --- a/src/main/java/com/juick/Message.java +++ b/src/main/java/com/juick/Message.java @@ -33,7 +33,7 @@ public class Message { private String Text = null; private User User = null; public List Tags = new ArrayList<>(); - private Date date = null; + private Date date; public int TimeAgo = 0; public int Privacy = 1; public boolean FriendsOnly = false; @@ -48,7 +48,7 @@ public class Message { public Place Place = null; public int Likes = 0; public boolean UserLike = false; - public ArrayList childs = new ArrayList<>(); + public List childs = new ArrayList<>(); private Optional PM = Optional.empty(); Optional Recommendation = Optional.empty(); @@ -122,16 +122,16 @@ public class Message { public int getChildsCount() { int cnt = childs.size(); - for (int i = 0; i < childs.size(); i++) { - cnt += childs.get(i).getChildsCount(); + for (Message child : childs) { + cnt += child.getChildsCount(); } return cnt; } public void cleanupChilds() { if (!childs.isEmpty()) { - for (int i = 0; i < childs.size(); i++) { - childs.get(i).cleanupChilds(); + for (Message child : childs) { + child.cleanupChilds(); } childs.clear(); } -- cgit v1.2.3