We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed6f11d commit 1528764Copy full SHA for 1528764
spring-boot/src/main/java/org/springframework/boot/json/BasicJsonParser.java
@@ -93,14 +93,14 @@ private Object parseInternal(String json) {
93
}
94
95
private static String trimTrailingCharacter(String string, char c) {
96
- if (string.length() >= 0 && string.charAt(string.length() - 1) == c) {
+ if (string.length() > 0 && string.charAt(string.length() - 1) == c) {
97
return string.substring(0, string.length() - 1);
98
99
return string;
100
101
102
private static String trimLeadingCharacter(String string, char c) {
103
- if (string.length() >= 0 && string.charAt(0) == c) {
+ if (string.length() > 0 && string.charAt(0) == c) {
104
return string.substring(1);
105
106
0 commit comments