From 69a5bdba32cdf0a48e51baa8c9fb28dca013f515 Mon Sep 17 00:00:00 2001 From: Alexander Alexeev Date: Wed, 7 Dec 2016 18:56:43 +0700 Subject: message improvenments, checking for tag's duplicates --- juick-crosspost/src/main/java/com/juick/components/Crosspost.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'juick-crosspost/src/main') diff --git a/juick-crosspost/src/main/java/com/juick/components/Crosspost.java b/juick-crosspost/src/main/java/com/juick/components/Crosspost.java index c39898f2..c84b50f6 100644 --- a/juick-crosspost/src/main/java/com/juick/components/Crosspost.java +++ b/juick-crosspost/src/main/java/com/juick/components/Crosspost.java @@ -17,6 +17,7 @@ */ package com.juick.components; +import com.juick.Tag; import com.juick.service.CrosspostService; import org.apache.commons.codec.Charsets; import org.apache.commons.codec.binary.Base64; @@ -284,8 +285,8 @@ public class Crosspost implements AutoCloseable { public String getMessageHashTags(final com.juick.Message jmsg) { String hashtags = ""; - for (int i = 0; i < jmsg.getTags().size(); i++) { - hashtags += "#" + jmsg.getTags().get(i) + " "; + for (Tag tag : jmsg.getTags()) { + hashtags += "#" + tag + " "; } return hashtags; } -- cgit v1.2.3