Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ private Map<String, Object> parseMapInternal(int nesting, String json) {
json = trimEdges(json, '{', '}').trim();
for (String pair : tokenize(json)) {
String[] split = StringUtils.split(pair, ":");
@Nullable String[] values = (split != null) ? StringUtils.trimArrayElements(split) : null;
Assert.state(values != null, () -> "Unable to parse '%s'".formatted(pair));
String rawKey = values[0];
String rawValue = values[1];
@Nullable String[] rawSplit = (split != null) ? StringUtils.trimArrayElements(split) : null;
Assert.state(rawSplit != null, () -> "Unable to parse '%s'".formatted(pair));
String rawKey = rawSplit[0];
String rawValue = rawSplit[1];
Assert.state(rawKey != null, () -> "rawKew is null in '%s'".formatted(pair));
Assert.state(rawKey.startsWith("\"") && rawKey.endsWith("\""),
"Expecting double-quotes around field names");
Expand Down