Skip to content

Commit

Permalink
Merge pull request #139 from snyk/fix/HEAD-307_logout_error_mesage
Browse files Browse the repository at this point in the history
fix: parser error when token is empty
  • Loading branch information
Avishagp authored May 12, 2023
2 parents 790bebf + 0b2d182 commit 62f9486
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 62f9486

Please sign in to comment.