Skip to content

Commit a9a7868

Browse files
committed
Merge branch '5.3.x'
# Conflicts: # spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompDecoder.java
2 parents e058a60 + 55b258f commit a9a7868

File tree

1 file changed

+5
-2
lines changed
  • spring-messaging/src/main/java/org/springframework/messaging/simp/stomp

1 file changed

+5
-2
lines changed

spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompDecoder.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -264,9 +264,12 @@ private void readHeaders(ByteBuffer byteBuffer, StompHeaderAccessor headerAccess
264264
* <a href="https://stomp.github.io/stomp-specification-1.2.html#Value_Encoding">"Value Encoding"</a>.
265265
*/
266266
private String unescape(String inString) {
267+
int index = inString.indexOf('\\');
268+
if (index == -1) {
269+
return inString;
270+
}
267271
StringBuilder sb = new StringBuilder(inString.length());
268272
int pos = 0; // position in the old string
269-
int index = inString.indexOf('\\');
270273

271274
while (index >= 0) {
272275
sb.append(inString, pos, index);

0 commit comments

Comments
 (0)