File tree Expand file tree Collapse file tree 5 files changed +10
-20
lines changed
spring-beans/src/main/java/org/springframework/beans/factory/parsing
spring-web/src/main/java/org/springframework/web/util/pattern
spring-webflux/src/main/java/org/springframework/web/reactive/function/server
spring-webmvc/src/main/java/org/springframework/web/servlet/function
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame Expand file tree Collapse file tree 5 files changed +10
-20
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2020 the original author or authors.
2
+ * Copyright 2002-2023 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -98,9 +98,7 @@ public String toString() {
98
98
for (ParseState .Entry entry : this .state ) {
99
99
if (i > 0 ) {
100
100
sb .append ('\n' );
101
- for (int j = 0 ; j < i ; j ++) {
102
- sb .append ('\t' );
103
- }
101
+ sb .append ("\t " .repeat (i ));
104
102
sb .append ("-> " );
105
103
}
106
104
sb .append (entry );
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2021 the original author or authors.
2
+ * Copyright 2002-2023 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -68,9 +68,7 @@ public String getMessage() {
68
68
public String toDetailedString () {
69
69
StringBuilder sb = new StringBuilder ();
70
70
sb .append (this .pattern ).append ('\n' );
71
- for (int i = 0 ; i < this .position ; i ++) {
72
- sb .append (' ' );
73
- }
71
+ sb .append (" " .repeat (Math .max (0 , this .position )));
74
72
sb .append ("^\n " );
75
73
sb .append (getMessage ());
76
74
return sb .toString ();
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2019 the original author or authors.
2
+ * Copyright 2002-2023 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -81,9 +81,7 @@ public void unknown(RouterFunction<?> routerFunction) {
81
81
}
82
82
83
83
private void indent () {
84
- for (int i = 0 ; i < this .indent ; i ++) {
85
- this .builder .append (' ' );
86
- }
84
+ this .builder .append (" " .repeat (Math .max (0 , this .indent )));
87
85
}
88
86
89
87
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2019 the original author or authors.
2
+ * Copyright 2002-2023 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -80,9 +80,7 @@ public void unknown(RouterFunction<?> routerFunction) {
80
80
}
81
81
82
82
private void indent () {
83
- for (int i = 0 ; i < this .indent ; i ++) {
84
- this .builder .append (' ' );
85
- }
83
+ this .builder .append (" " .repeat (Math .max (0 , this .indent )));
86
84
}
87
85
88
86
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2022 the original author or authors.
2
+ * Copyright 2002-2023 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -59,9 +59,7 @@ private String escapeSockJsSpecialChars(char[] characters) {
59
59
if (isSockJsSpecialChar (c )) {
60
60
result .append ('\\' ).append ('u' );
61
61
String hex = Integer .toHexString (c ).toLowerCase ();
62
- for (int i = 0 ; i < (4 - hex .length ()); i ++) {
63
- result .append ('0' );
64
- }
62
+ result .append ("0" .repeat (Math .max (0 , (4 - hex .length ()))));
65
63
result .append (hex );
66
64
}
67
65
else {
You can’t perform that action at this time.
0 commit comments