Skip to content

merging changes to token cache #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 24, 2019
Merged

merging changes to token cache #41

merged 2 commits into from
May 24, 2019

Conversation

SomkaPe
Copy link
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
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
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
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
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