ignore whitespace when trying to detect provisioning json

fixes #3940
This commit is contained in:
Daniel Gultsch 2020-12-07 09:03:01 +01:00
parent 303e205276
commit 261207a4c0

View file

@ -246,6 +246,7 @@ public class UriHandlerActivity extends AppCompatActivity {
}
private static boolean looksLikeJsonObject(final String input) {
return input.charAt(0) == '{' && input.charAt(input.length() - 1) == '}';
final String trimmed = Strings.emptyToNull(input).trim();
return trimmed.charAt(0) == '{' && trimmed.charAt(trimmed.length() - 1) == '}';
}
}