You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "arunpati (via GitHub)" <gi...@apache.org> on 2026/10/24 07:15:14 UTC

[PR] Fixed: NullPointerException in BOMNode.substituteNode for rules without quantity (OFBIZ-13694) [ofbiz-framework]

arunpati opened a new pull request, #2416:
URL: https://github.com/apache/ofbiz-framework/pull/2416

   Fixed: NullPointerException in BOMNode.substituteNode for rules without quantity (OFBIZ-13694)
   
   GenericValue.getBigDecimal returns null for an empty field instead of throwing, so the try/catch around the ProductManufacturingRule quantity never ran and ruleQuantity stayed null. The following compareTo then failed with a NullPointerException and the whole BOM explosion aborted, although quantity is optional on ProductManufacturingRule and in the addProductManufacturingRule service.
   
   Treat a missing quantity as zero, which already means "keep the BOM line's own quantity", and drop the unreachable try/catch.
   
   Add a bomtests suite with test data reproducing the report: a finished good whose virtual component is substituted by a rule without quantity now explodes to the variant with the BOM line quantity, and a rule with a quantity still overrides it.
   
   
   Thanks Jamal Tex Chi for reporting the issue
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ofbiz.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fixed: NullPointerException in BOMNode.substituteNode for rules without quantity (OFBIZ-13694) [ofbiz-framework]

Posted by "arunpati (via GitHub)" <gi...@apache.org>.
arunpati merged PR #2416:
URL: https://github.com/apache/ofbiz-framework/pull/2416


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ofbiz.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org