Skip to content

Fixed: ProductConfigWrapper fails with a NullPointerException after the session is restored (OFBIZ-13774) - #2505

Merged
mridulpathak merged 1 commit into
apache:trunkfrom
mridulpathak:OFBIZ-13774
Oct 30, 2026
Merged

mridulpathak merged 1 commit into
apache:trunkfrom
mridulpathak:OFBIZ-13774

Conversation

@mridulpathak

Copy link
Copy Markdown
Contributor

Two fixes in ProductConfigWrapper:

  • ConfigItem.configItem was declared transient, although GenericValue is serializable, so once a ProductConfigWrapper had been deserialized, isSingleChoice, getQuestion, getDescription and toString failed with a NullPointerException. The field is now serialized like configItemAssoc next to it.
  • ConfigOption.recalculateOptionPrice called calculateProductPrice twice with the same arguments and checked only the second result for errors. It now makes the call once, checks that result, and takes the delegator from the wrapper's getter instead of its transient field.

…plicate price call

ConfigItem.configItem was declared transient, although GenericValue is serializable, so once a ProductConfigWrapper had been deserialized, isSingleChoice, getQuestion, getDescription and toString failed with a NullPointerException. The field is now serialized like configItemAssoc next to it. ConfigOption.recalculateOptionPrice also called calculateProductPrice twice with the same arguments and checked only the second result for errors; it now makes the call once, checks that result, and takes the delegator from the wrapper's getter instead of its transient field.
@github-actions github-actions Bot added the bug label Oct 30, 2026
@mridulpathak
mridulpathak merged commit af50c96 into apache:trunk Oct 30, 2026
7 checks passed
@mridulpathak
mridulpathak deleted the OFBIZ-13774 branch October 30, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant