compatibility with jackson 2.6.7 and json-smart 1.3.1#242
Conversation
| return mapper.readValue(json, clazz); | ||
| } catch (JsonProcessingException e) { | ||
| } catch (IOException e) { | ||
| throw new RuntimeException("JsonProcessingException: " + e.getMessage(), e); |
There was a problem hiding this comment.
JsonProcessingException [](start = 40, length = 23)
nit: consider changing this?
There was a problem hiding this comment.
good point - going to change message
| long expiresIn = 0; | ||
| if (jsonObject.containsKey("expires_in")) { | ||
| expiresIn = jsonObject.getAsNumber("expires_in").longValue(); | ||
| expiresIn = Long.parseLong(jsonObject.getAsString("expires_in")); |
There was a problem hiding this comment.
Long.parseLong( [](start = 24, length = 15)
should this have been a mthod in the JSONObjectUtils instead? to align behavior and parsing logic in one place?
There was a problem hiding this comment.
yes, but that method expects json value as JSON number, so fails if it is string. AAD returns those values as JSON number, B2C as JSON String, so can not rely on JSONObjectUtils
| import lombok.AccessLevel; | ||
| import lombok.Builder; | ||
| import lombok.Getter; | ||
| import lombok.*; |
There was a problem hiding this comment.
https://google.github.io/styleguide/javaguide.html#s3.3.1-wildcard-imports. This is shared by most style guides.
Intellij defaults to this, but you can update it.
#240
#213