Skip to content

Commit

Permalink
fix: parser error when token is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterSchafer committed May 11, 2023
1 parent 790bebf commit 0b2d182
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private void setupProcessBuilderBase(ProcessBuilder pb) {

String authMethod = Preferences.getInstance().getPref(Preferences.AUTHENTICATION_METHOD);
String token = Preferences.getInstance().getAuthToken();
if (token != null && authMethod.equals(Preferences.AUTH_METHOD_OAUTH)) {
if (token != null && !token.isBlank() && authMethod.equals(Preferences.AUTH_METHOD_OAUTH)) {
try {
ObjectMapper objectMapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
var oauthToken = objectMapper.readValue(token, OAuthToken.class);
Expand Down

0 comments on commit 0b2d182

Please sign in to comment.