Skip to content

merging changes to token cache#41

Merged
SomkaPe merged 2 commits intodevfrom
somkape/jsonMerge
May 24, 2019
Merged

merging changes to token cache#41
SomkaPe merged 2 commits intodevfrom
somkape/jsonMerge

Conversation

@SomkaPe
Copy link
Copy Markdown
Contributor

@SomkaPe SomkaPe commented May 24, 2019

Preserving all "unknown" content in the serialized cache during cache serialization.

@SomkaPe SomkaPe requested review from henrik-me and sangonzal May 24, 2019 03:22

package com.microsoft.aad.msal4j;

public enum CredentialTypeEnum {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also use Lombok here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will change

JsonElement uValue = uEntry.getValue();
if (!old.has(key)) {
if(!uValue.isJsonNull() &&
!(uValue.isJsonObject() && uValue.getAsJsonObject().size() == 0)){
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this uValue.getAsJsonObject().size() != 0

Copy link
Copy Markdown
Contributor Author

@SomkaPe SomkaPe May 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this expression means if
value is not null and not (empty object)
save it

@SomkaPe SomkaPe merged commit 7583dc6 into dev May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants