diff options
author | syeyoung <cyong06@naver.com> | 2021-03-27 02:11:17 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-03-27 02:11:53 +0900 |
commit | 5608fb71917c12f065c1dd5ce319d08ec6850382 (patch) | |
tree | 76eeed4bc6a85503234e64261a8aae8c3040243f /src/main/java/kr/syeyoung/dungeonsguide/stomp | |
parent | 51588fa8f845e0d6b1b420d1546d820850e3e0f5 (diff) | |
download | Skyblock-Dungeons-Guide-5608fb71917c12f065c1dd5ce319d08ec6850382.tar.gz Skyblock-Dungeons-Guide-5608fb71917c12f065c1dd5ce319d08ec6850382.tar.bz2 Skyblock-Dungeons-Guide-5608fb71917c12f065c1dd5ce319d08ec6850382.zip |
fix bannables
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/stomp')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/stomp/StompPayload.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompPayload.java b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompPayload.java index c3e00de7..19dd4ac1 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompPayload.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompPayload.java @@ -5,9 +5,7 @@ import lombok.Data; import lombok.Singular; import lombok.experimental.Accessors; -import java.util.HashMap; -import java.util.Map; -import java.util.Scanner; +import java.util.*; @Data @Accessors(chain = true, fluent = true) @@ -59,12 +57,11 @@ public class StompPayload { stompPayload.headers.put(name, value); } - StringBuilder payloadBuilder = new StringBuilder(); + List<String> lines = new ArrayList<String>(); while (scanner.hasNextLine() && !(line = scanner.nextLine()).equals("\0")) { - payloadBuilder.append(line); - payloadBuilder.append("\n"); + lines.add(line); } - stompPayload.payload = payloadBuilder.toString(); + stompPayload.payload = String.join("\n", lines); return stompPayload; } } |