svn commit: r505229 - /ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ProductFeatureServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r505229 - /ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ProductFeatureServices.java

jacopoc
Author: jacopoc
Date: Fri Feb  9 01:16:31 2007
New Revision: 505229

URL: http://svn.apache.org/viewvc?view=rev&rev=505229
Log:
Reverted rev. 495891 committed by Jacques Le Roux (based on a patch from Jonathon Wong, OFBIZ-620):

'Prepend feature idCodes with '-''

I'm sorry for this, I know that there has been a (rather long) discussion about this (very minor) patch, that has consumed a lot of time of some of the main committers (and now also mine!).
I don't like this code because it is too custom specific (why not '_' ?) and because it generates longer product ids (a bad thing if you have many different features) and because, if you want to prepend the '-' symbol to the idCodes you can actually add it to the idCodes.

Modified:
    ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ProductFeatureServices.java

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ProductFeatureServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ProductFeatureServices.java?view=diff&rev=505229&r1=505228&r2=505229
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ProductFeatureServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/feature/ProductFeatureServices.java Fri Feb  9 01:16:31 2007
@@ -229,7 +229,7 @@
                                List newFeatures = new LinkedList();
                                List newFeatureIds = new LinkedList();
                                if (currentFeature.getString("idCode") != null)
-                                newCombination.put("defaultVariantProductId", productId + "-" + currentFeature.getString("idCode"));
+                                newCombination.put("defaultVariantProductId", productId + currentFeature.getString("idCode"));
                             else
                                 newCombination.put("defaultVariantProductId", productId);
                             newFeatures.add(currentFeature);