diff options
author | Vitaly Takmazov | 2016-12-14 17:26:29 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-12-14 17:26:29 +0300 |
commit | 91ee5d2578868125fcaf35d6fe08ef3604640cd6 (patch) | |
tree | a3f022ba5bc6d5fee3fcf14d5ac312d398e2a6b2 /juick-notifications/src/main/java/com/juick/components/Notifications.java | |
parent | f5285b6724ca0dee8dab876f097ac2b691dfe4a6 (diff) |
juick-notifications: components should not depend on database
Diffstat (limited to 'juick-notifications/src/main/java/com/juick/components/Notifications.java')
-rw-r--r-- | juick-notifications/src/main/java/com/juick/components/Notifications.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/juick-notifications/src/main/java/com/juick/components/Notifications.java b/juick-notifications/src/main/java/com/juick/components/Notifications.java index f98fdcce..b06e0abf 100644 --- a/juick-notifications/src/main/java/com/juick/components/Notifications.java +++ b/juick-notifications/src/main/java/com/juick/components/Notifications.java @@ -55,6 +55,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.stream.Collectors; /** * @author Ugnich Anton @@ -277,10 +278,9 @@ public class Notifications implements AutoCloseable { } static String stringifyWnsHttpHeaders(final Header[] allHeaders) { - String[] wnsHeaders = Arrays.stream(allHeaders) + return Arrays.stream(allHeaders) .filter(x -> x.getName().startsWith("X-WNS-") || x.getName().startsWith("WWW-")) .map(x -> x.getName() + ": " + x.getValue()) - .toArray(String[]::new); - return String.join("\n", wnsHeaders); + .collect(Collectors.joining("\n")); } } |