[ https://issues.apache.org/jira/browse/OFBIZ-4375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13092434#comment-13092434 ]
Jacques Le Roux commented on OFBIZ-4375: ---------------------------------------- Hi Atul, Good work, I only reviewed so far and must say I really appreciated the comments :) Some questions/remarks though: # why do you write + // prodCatalogMap should be prodCatalogMap2, it's a TYPO. Moreover we don't even need it, whatever isn't calatlog (isCatalog == false) is a category. + prodCatalogMap2.put("isCategoryType", true); ie, why not removing last line then? Did you check if it's used elsewhere and should not be replaced by another test? # As you noticed in + // Let's use prodCatalog.getString("prodCatalogId") instead of prodCatalog.prodCatalogId, to keep things consistant, will look into "which one is better" later it's actually Groovy, so everywhere you can use prodCatalog.prodCatalogId style of instead prodCatalog.getString("prodCatalogId") # So you can also write prodCatalogMap2.productCategoryId = productCat.productCategoryId; rather than prodCatalogMap2.put("productCategoryId", productCat.getString("productCategoryId")); This is called property notation in Groovy: http://groovy.codehaus.org/Collections#Collections-Maps. There are tons of examples OOTB HTH > TYPO in CategoryTree.groovy, lot's of un-used/un-wanted variables and > un-clean & really hard to understand code > --------------------------------------------------------------------------------------------------------------- > > Key: OFBIZ-4375 > URL: https://issues.apache.org/jira/browse/OFBIZ-4375 > Project: OFBiz > Issue Type: Bug > Components: product > Reporter: Atul Vani > Assignee: Jacques Le Roux > Fix For: Release Branch 11.04, SVN trunk > > Attachments: OFBIZ-4375.patch, OFBIZ-4375.patch > > > TYPO in CategoryTree.groovy: > <<prodCatalogMap.put("isCategoryType", true);>> should be > <<prodCatalogMap2.put("isCategoryType", true);>> > lot's of un-used/un-wanted variables: > i, prodCatalogTree2, prodCatalogCategories, prodCatalog, prodCatalogId > un-clean and really hard to understand code. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira