We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e33f463 commit 31ff8a2Copy full SHA for 31ff8a2
1 file changed
src/main/java/org/json/JSONObject.java
@@ -1558,7 +1558,7 @@ private static String getKeyNameFromMethod(Method method) {
1558
// if the first letter in the key is not uppercase, then skip.
1559
// This is to maintain backwards compatibility before PR406
1560
// (https://github.com/stleary/JSON-java/pull/406/)
1561
- if (Character.isLowerCase(key.charAt(0))) {
+ if (key.length() > 0 && Character.isLowerCase(key.charAt(0))) {
1562
return null;
1563
}
1564
if (key.length() == 1) {
0 commit comments