ShoppingCart.java: a tabs has been automatically replaced by 8 spaces, fixes it
UtilValidate.java: removes useless parentheses
GeneriDao.java: fixes a wrong UtilValidate.isNotEmpty
ModelFormField.java: revert all UtilValidate.is(Not)Empty() changes though I ddid not find an error there, it must be one because https://localhost:8443/humanres/control/EditResponsibilityTypes is not rendered correctly. I will check again
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1169754 13f79535-47bb-0310-9956-ffa450edef68
I did not change simple-methods where processor-name="person" is called (in call-map-processor) because I think we want this change only in createPerson service. Hopefully with the comment it will be now quite obvious
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1169670 13f79535-47bb-0310-9956-ffa450edef68
Changes implementation of UtilValidate.isEmpty() for Collection and Map by using isEmpty() instead of c.size() == 0). It's more clear and as efficient. Removes also useless parentheses there.
Makes use of UtilValidate.is(Not)Empty() everywhere it makes senses. This for 2 reasons:
* Make the code more readable by replacing the (!)null/isEmpty pattern.
* Avoid possible NPEs when only isEmpty() was used (after Entity.find... for instance). I found a lot of cases (242 today) where isEmpty() could perhaps be replaced in Framework. But I guess no NPE checks were missing there and anyway it was too much for me to check them all... So I only did the relevant changes in Applications...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1169478 13f79535-47bb-0310-9956-ffa450edef68
loadCartFromQuote is currently copying all adjustments from a quote into the order-wide adjustments for the shopping cart. Tax adjustments should be copied into the shipping group, i.e. treated in a different way from adjustments like a discount.
There's also a, unit test that demonstrates the bug. Apply just the test patch and you should see the problem. Apply the other patch with the change to loadCartFromQuote, and the test should pass.
jleroux: also a French label fix
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1167606 13f79535-47bb-0310-9956-ffa450edef68
createItemIssuanceRole and deleteItemIssuanceRole both call checkCanChangeShipmentStatusPacked, which checks the current status of a shipment to see if anything about it can be modified.
Therefore, these services require a shipmentId parameter, but at present their service definitions don't say so.
At high logging levels, this bug causes log entries to say there's a missing PK value on a FindOne.
This is not a major problem at present. create... is only called in the midst of another service and the test has already been done, but a direct call to create... might cause incorrect behaviour. delete... is not called within Ofbiz at present.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1167517 13f79535-47bb-0310-9956-ffa450edef68
I installed ofbiz from scratch according with recommended method
>ant clean-all
>ant run-install-extseed
>ant create-admin-user-login
>./startofbiz.sh
Then, when I create an store by https://localhost:8443/ofbizsetup/control/createProductStore
Error: Error parsing entity xml file: org.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:CarrierShipmentMethod][createdStamp,2011-08-29 11:16:33.247(java.sql.Timestamp)][createdTxStamp,2011-08-29 11:16:32.951(java.sql.Timestamp)][lastUpdatedStamp,2011-08-29 11:16:33.247(java.sql.Timestamp)][lastUpdatedTxStamp,2011-08-29 11:16:32.951(java.sql.Timestamp)][partyId,sds(java.lang.String)][roleTypeId,CARRIER(java.lang.String)][sequenceNumber,4(java.lang.Long)][shipmentMethodTypeId,LOCAL_DELIVERY(java.lang.String)] (SQL Exception while executing the following:INSERT INTO public.CARRIER_SHIPMENT_METHOD (SHIPMENT_METHOD_TYPE_ID, PARTY_ID, ROLE_TYPE_ID, SEQUENCE_NUMBER, CARRIER_SERVICE_CODE, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: inserción o actualización en la tabla «carrier_shipment_method» viola la llave foránea «carr_shmeth_type»<br/> Detail: La llave (shipment_method_type_id)=(LOCAL_DELIVERY) no está presente en la tabla «shipment_method_type».)) calling service parseEntityXmlFile in importTempDataFile
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1167510 13f79535-47bb-0310-9956-ffa450edef68
In ProductionRunCosts.ftl there is unclosed div for screenlet-body, due to this unclosed page not render properly. You can view this behavior properly in Tomahawk theme.
jleroux: I added also some checks to prevent unlikely NPEs
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1167501 13f79535-47bb-0310-9956-ffa450edef68
If we setup the custom uom conversion method which is called by convertUom service, and then invoke convertUom service, the exception raised:
Could not complete the Convert UOM values...blahblah...Unknown parameter found: [convertUomCustom.asOfDate]Unknown parameter found: [convertUomCustom.defaultDecimalScale]Unknown parameter found: [convertUomCustom.defaultRoundingMode]Unknown parameter found: [convertUomCustom.purposeEnumId].
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1167480 13f79535-47bb-0310-9956-ffa450edef68
Removes redundant controller entries from product component's catalog webapp.
Moves one of the entries, so that related entries be all together. Those entries were exactly same, except for '<request-map uri="updateCategoryContent">' for which the removed entry had '<event type="service" path="" invoke="updateCategory"/>', but there exists no service with name 'updateCategory', the other entry has 'updateProductCategory' service called in it's event.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1167314 13f79535-47bb-0310-9956-ffa450edef68
Some variables are declared as Map<String, String> but assigned collections where not all values are strings. These statements will not compile with some Java compilers.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1167132 13f79535-47bb-0310-9956-ffa450edef68
In ordershippinginfo.ftl, a list of shipping methods is presented, and when one is chosen values are written into an OrderItemShipGroup. The shipping methods are defined by rows in ProductStoreShipMethod, and one of the attributes of this entity is a carrierRoleTypeId. Similarly, OrderItemShipGroup has a carrierRoleTypeId, but no data is being written into it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1167116 13f79535-47bb-0310-9956-ffa450edef68
When using a billing account the processCaptureResult will fail with a missing captureRefNum parameter.
There is a hack that sets it to an empty string but i guess a change occurred and calling makeValid will convert that empty string to null making the service call fail.
The fix is simply a matter of copying the workaround in private static void processCaptureResult(DispatchContext dctx, Map<String, Object> result, GenericValue userLogin, GenericValue paymentPreference, String authServiceType):
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1165130 13f79535-47bb-0310-9956-ffa450edef68
I have kept tomcat-6.0.32-tomcat-juli-adapters.jar & tomcat-6.0.32-tomcat-juli.jar and renamed them to 33, did not find any issues...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1165125 13f79535-47bb-0310-9956-ffa450edef68
Actually I hastily did it bad using static instead of caching. Anyway, I checked there are no real needs to change current code in OFBiz for perf.: one instance is in an exception and the other not called OOTB...
Was: Closes https://issues.apache.org/jira/browse/OFBIZ-4201
"DateFormat.getDateTimeInstance() is very expensive, we can cache it to improve performance"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1165084 13f79535-47bb-0310-9956-ffa450edef68
"DateFormat.getDateTimeInstance() is very expensive, we can cache it to improve performance"
jlr: It's not really cache but a static class constant
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1165076 13f79535-47bb-0310-9956-ffa450edef68