File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
lib/src/main/java/ua/naiksoftware/stomp/client Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ public class StompMessage {
1717 public static final String TERMINATE_MESSAGE_SYMBOL = "\u0000 " ;
1818
1919 private static final Pattern PATTERN_HEADER = Pattern .compile ("([^:\\ s]+):([^:\\ s]+)" );
20- private static final Pattern PATTERN_PAYLOAD = Pattern .compile ("[^\\ u0000]*" );
2120
2221 private final String mStompCommand ;
2322 private final List <StompHeader > mStompHeaders ;
@@ -76,7 +75,9 @@ public static StompMessage from(String data) {
7675 }
7776
7877 reader .skip ("\\ s" );
79- String payload = reader .hasNext (PATTERN_PAYLOAD ) ? reader .next (PATTERN_PAYLOAD ) : null ;
78+
79+ reader .useDelimiter (TERMINATE_MESSAGE_SYMBOL );
80+ String payload = reader .hasNext () ? reader .next () : null ;
8081
8182 return new StompMessage (command , headers , payload );
8283 }
You can’t perform that action at this time.
0 commit comments