Skip to content

Fixed: createUpdateBillingAddressAndPaymentMethod throws NPE for anonymous checkout (OFBIZ-13584) - #2005

Merged
mridulpathak merged 1 commit into
apache:trunkfrom
mridulpathak:OFBIZ-13584
Sep 15, 2026
Merged

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

Conversation

@mridulpathak

Copy link
Copy Markdown
Contributor

The method dereferenced userLogin.userLoginId without checking userLogin for null first, throwing a NullPointerException whenever a partyId is present but the shopping cart has no associated userLogin (an anonymous checkout carrying a resolved party from elsewhere). The original minilang's dotted-field access degraded gracefully to null in that case instead of crashing. The guard now checks userLogin is non-null before accessing userLoginId, matching the pattern already used in the sibling method createUpdateCustomerAndShippingAddress in the same file.

…ymous checkout (OFBIZ-13584)

The method dereferenced userLogin.userLoginId without checking userLogin for null first, throwing a NullPointerException whenever a partyId is present but the shopping cart has no associated userLogin (an anonymous checkout carrying a resolved party from elsewhere). The original minilang's dotted-field access degraded gracefully to null in that case instead of crashing. The guard now checks userLogin is non-null before accessing userLoginId, matching the pattern already used in the sibling method createUpdateCustomerAndShippingAddress in the same file.
@mridulpathak
mridulpathak merged commit 5f1730b into apache:trunk Sep 15, 2026
7 checks passed
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.

1 participant