File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -156,20 +156,21 @@ public int hashCode() {
156156 @ Override
157157 public String toString () {
158158 int maxLen = 80 ;
159- int len = Math .min (content .length (), maxLen );
159+ int contentLength = this .content .length ();
160+ int len = Math .min (contentLength , maxLen );
160161
161162 StringBuilder sb = new StringBuilder (len + 20 );
162163
163164 for (int i = 0 ; i < len ; i ++) {
164- char c = content .charAt (i );
165+ char c = this . content .charAt (i );
165166 switch (c ){
166167 case '\n' -> sb .append ("\\ n" );
167168 case '\r' -> sb .append ("\\ r" );
168169 default -> sb .append (c );
169170 }
170171 }
171172
172- if (content . length () > maxLen ) {
173+ if (contentLength > maxLen ) {
173174 sb .append ("...(truncated)" );
174175 }
175176
You can’t perform that action at this time.
0 commit comments