(OFBIZ-9452)
This sets non-final static fields to final, avoids display of known null
values in the errors messages and removes unneccessary null checks on
known null variables.
Thanks Kyra Pritzel-Hentley for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1801271 13f79535-47bb-0310-9956-ffa450edef68
Changing item quantity in cart was setting the flag isModifiedPrice true which is conflicting with updatePrice condition and hence price recalculation was not being triggered.
Thanks Aditi Patidar for reporting the issue and providing patch. Thanks Paul Foxworthy for reviewing the issue and providing the research details.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1801269 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9451)
At two occurrences, an Error is logged which contains the variable
processorResult. At that point however processorResult is certain to be null.
Remove the variable from the log. Remove unreachable else condition in
processAuthResult(). authResult can only be true or false, no third condition
needed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1801185 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9451)
Use a StringBuilder to append a certain amount of '*'s to origMaskedNumber.
When using concatenation inside the loop, the String is converted to a new
StringBuilder, appended to, and then converted back to a String anyway.
Therefore the performance is improved by avoiding many StringBuilder
initializations.
ReturnHeaderResp in RefundGcPurchase() is unnecessarily checked for null value.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1801183 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9451)
Set BigDecimal ZERO to final to avoid changes by malicious code from the outside
or changes that happen by accident from another package.
ReturnHeaderResp in RefundGcPurchase() is unnecessarily checked for null value.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1801171 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9449)
While working on an issue reported by Pierre Gaudin on user ML
https://s.apache.org/gDo3, here quoted:
I found another issue while testing: the port 8443 is missing in the URL used
underneath by the form reported by Pierre.
It was broken by OFBIZ-9206 where I removed the value of port.https in
url.properties.
It's not an issue if you set the value of port.https, or let it empty when
using a SSL certificate on a production server. But if you try locally
(localhost) then the URL misses the 8443 port.
Solution append 8443 as default secure port when using localhost
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1801094 13f79535-47bb-0310-9956-ffa450edef68
does not use fallback locale.
(OFBIZ-9445)
If no alternate locale content for the requested locale is found, search for an
alternate locale content with the locale configured in general.properties at
locale.properties.fallback. If this one isn't found either we can still return
the original content.
Thanks Tobias Laufkötter for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1800853 13f79535-47bb-0310-9956-ffa450edef68
does not use fallback locale.
(OFBIZ-9445)
If no alternate locale content for the requested locale is found, search for an
alternate locale content with the locale configured in general.properties at
locale.properties.fallback. If this one isn't found either we can still return
the original content.
Thanks Tobias Laufkötter for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1800780 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9435)
Another round of refactoring in the start component with the following changes:
- Change the default adminKey to "NA" since it is only used in the "start"
context. Other contexts do not require an admin server (test, load-data)
- Simplify and cleanup the locale creation logic in the constructor and move
things out to the method with a return value
- Simplify the Timezone creation logic by moving it outside the constructor into
a small method
- Substantially simplify the determineOfbizPropertiesFileName(..) method by
reversing the order of condition evaluation (first, load-data, then test, then
anything else is start)
- Change default locale to be 'en' as the system crashes if not provided.
- Remove all comments from properties files except for start.properties and
refer to it from the other properties files
- Update the properties files accordingly
Thanks: Jacques Le Roux for review and suggestion to remove the comments from
properties files
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1800368 13f79535-47bb-0310-9956-ffa450edef68
creating the wanted data structure.
(OFBIZ-9393)
This patch removes a number of outdated methods that took a fixed number of
objects to create a data structure, such as a linked list. Since the code is
outdated and inflexible, this patch removes these methods and added methods to
create the given data structure via a variable amount of arguments.
This approach also ensures that no other code needs a refactoring. In addition
the method populateMap() was removed which was private and was only used by the
multiple outdated toMap() functions.
Thanks Martin Becker for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1800299 13f79535-47bb-0310-9956-ffa450edef68
finish the service conversion : getRateAmount, getRatesAmountsFromWorkEffortId, getRatesAmountsFromPartyId, getRatesAmountsFromEmplPositionTypeId and filterRateAmountList
I create a generic groovy function getRateAmoutForm to remove duplicate code and refactoring the filterRateAmount for simplicity
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1800245 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9436)
Applied the following changes:
- reduced the copy-paste pattern in creating the directory structure for a
new component by converting the mkdir logic into a loop over a list of the
directory names
- reduced the copy-paste pattern in creating the files from their templates
by converting the calls to the generator function to a loop over a list
of maps containing the arguments to the generator function
- added missing src/java/main and src/java/test
- removed duplicate / redundant directories as creating child directory
automatically creates the parent
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1800073 13f79535-47bb-0310-9956-ffa450edef68
While checking there were no other cases like in OFBIZ-9432
(missing path to class), to be consistent I removed the trailing semicolons in
groovy scripts and made few formatting
I did not changes tests code
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1799867 13f79535-47bb-0310-9956-ffa450edef68
Taher pointed out in dev ML that kill is not an atomic operation.
So the previous behaviour does not change. In most cases SIGKILL is still the
action which kills the process before SIGTERM has a chance to terminate it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1799852 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9429)
This changes the service definition of createGLAccount to use the pk
attributes as OUT instead of INOUT so that the glAccountId will be
generated by OFBiz instead of being provided to the service.
Thanks Sharan Foga for reporting.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1799793 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9425)
Service createShipment can create both sales and purchase shipment with
workeffort.
For sales shipment it creates SHIPMENT_OUTBOUND type work effort
For purchase shipment it creates SHIPMENT_INBOUND type work effort.
The maps used are shipWorkEffortMap to create outbound work effort and
arrivalWorkEffortMap to create inbound shipment.
Which work effort will be created decided by the condition whether parameters.
estimatedShipDate is coming or parameters.estimatedArrivalDate is coming.
With existing logic the workEffort.workEffortTypeId, workEffort.currentStatusId
and workEffort.workEffortPurposeTypeId is not persist into db as values set
into the wrong map.
Thanks: Wai for report and patch, Rishi Solanki for clear explanation
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1799767 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9392)
No functional change, but an almost complete rewrite of the tomcat container
with the following highlights:
- breakup the logic in init() many smaller functions each specializing in one
thing
- Unify the host creation logic between main host and context-specific hosts
- introduce streams and lambdas where appropriate
- rename loadComponents() to loadWebapps()
- rename createContext() to createCallableContext()
- rename configureContext() to prepareContext()
- remove instance variables that are not necessary / redundant for operating
the container correctly and refactor the code logic accordingly
- remove unnecessary valve comments and point to documentation URL
- remove any commented out code
- remove the static block for initializing SSLUtil.loadJsseProperties(). This
- code is already called and hence redundant
- remove redundant / dead / unused code
- add missing FilterDef to context
- rename J2EE server from "ofbiz container 3.1" to "ofbiz container"
- lots and lots of re-arranging and small code improvements
Thanks: Jacopo Capellato, Michael Brohl, Scott Gray and Jacques Le Roux for
your help in testing, reviewing and providing feedback.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1799708 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9305)
When print.verbose was set to true in debug.properties, the unit test
EntitySaxReaderTests.parse was failing because it is using some mock objects;
fixed by temporarily disabling the verbose logging during the test.
Thanks: William Wang for the report.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1799417 13f79535-47bb-0310-9956-ffa450edef68
With service rate minilang conversion to groovy, I renamed deleteRateAmount and deletePartyRate to expireRateAmount and expirePartyRate for more coherence between the service process and the name. The previous service naming have been kept to set them as deprecated
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1799252 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9373)
After using plain text for the field [articleData], when I post the form,
I get the following error message:
The following required parameter is missing: [IN]
[createElectronicText.dataResourceId]]
jleroux: it was a bug introduced with r1765319 while refactoring to use
entity-auto
Thanks: Daniel Coric who find the reason and Yao who initially reported and
helped to find a solution
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1799088 13f79535-47bb-0310-9956-ffa450edef68