You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Pawan Verma (JIRA)" <ji...@apache.org> on 2019/05/14 08:42:00 UTC
[jira] [Comment Edited] (OFBIZ-11029) Issue in function
getVariantSelectionFeatures of ProductWorker.java
[ https://issues.apache.org/jira/browse/OFBIZ-11029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16839209#comment-16839209 ]
Pawan Verma edited comment on OFBIZ-11029 at 5/14/19 8:41 AM:
--------------------------------------------------------------
Nice Catch, Yes it should be isVirtual instead of productId. Attached patch for the same and also handled a NullPointerException for variantProduct.
I have also updated Affected Version(s).
was (Author: pawan.verma):
Nice Catch, Yes it should be isVirtual instead of productId. Attached patch for the same and also handled a NullPointerException for variantProduct.
> Issue in function getVariantSelectionFeatures of ProductWorker.java
> -------------------------------------------------------------------
>
> Key: OFBIZ-11029
> URL: https://issues.apache.org/jira/browse/OFBIZ-11029
> Project: OFBiz
> Issue Type: Bug
> Components: product
> Affects Versions: Trunk, 16.11.05, Release Branch 17.12, 18.12.01
> Reporter: Denglong Zhou
> Assignee: Pawan Verma
> Priority: Critical
> Labels: product, variant
> Attachments: OFBIZ-11029.patch
>
> Original Estimate: 0.25h
> Remaining Estimate: 0.25h
>
> {code:java}
> //代码占位符
> public static List<GenericValue> getVariantSelectionFeatures(GenericValue variantProduct) {
> if (!"Y".equals(variantProduct.getString("isVariant"))) {
> return null;
> }
> GenericValue virtualProduct = ProductWorker.getParentProduct(variantProduct.getString("productId"), variantProduct.getDelegator());
> if (virtualProduct == null || !"Y".equals(virtualProduct.getString("productId"))) {
> return null;
> }
> {code}
> for the above coding, i guess the part colored by red should be the following,
> {code:java}
> //代码占位符
> if (virtualProduct == null || !"Y".equals(virtualProduct.getString("isVirtual"))) {
> {code}
> thanks!
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)