Skip to content
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

Update dirty flag on modifying section values #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

naveenjr7
Copy link

@naveenjr7 naveenjr7 commented Aug 26, 2024

Today when we make any changes to any section in Gppmodel object, its not getting reflected while we encoding back.
And root cause for this issue is, dirty flag is not getting updated properly on setFieldValue method.

@chuff could you please review this.

Issue can be reproduced with below steps

GppModel gppModel = new GppModel("DBABBg~BVoIgACY.QA");
// Ideally, this should cause validation failure
// Reference: https://github.com/IABTechLab/iabgpp-java/blob/fcd606121f5795080620099a9dc51dac0482f46f/iabgpp-encoder/src/main/java/com/iab/gpp/encoder/segment/UsCaV1CoreSegment.java#L110-L115
gppModel.setFieldValue(UsCaV1.NAME, UsCaV1Field.SHARING_OPT_OUT_NOTICE, 0);
gppModel.setFieldValue(UsCaV1.NAME, UsCaV1Field.SHARING_OPT_OUT, 1);
String encodedString = gppModel.encode();

@naveenjr7
Copy link
Author

thanks for the approval. @iabmayank could you please help merging this fix

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.

3 participants