* removed unnecessary synchronization
* protected the UtilCache object (static field) by making it private and final
* replaced non atomic containsKey+put+get with get + putIfAbsentAndGet
* replaced containsKey + null check + get with get + null check
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343692 13f79535-47bb-0310-9956-ffa450edef68
On production systems you can't suppress Debug.log( message by the use of debug.properties file. It is always good to use Debug.* statements that are having log level setup in debug.properties file. The real problem comes with Debug.log( statement when you are printing any list or map object that contains so many records(or data) in it. Here I am changing all the occurrence of Debug.log( with Debug.logInfo(, Debug.logError( or Debug.logWarning( so that we can have better control of Debug.* statements on production system. :-)
Bad use of Debug statement. On production system you will get false alarm that you are having error in code base although the resultant statement is only giving additional information instead of error message.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1335927 13f79535-47bb-0310-9956-ffa450edef68
* captcha images created and then lost
* captcha images created in the wrong location (for example out of the OFBiz folder)
* the folder runtime/tempfiles/captcha could be locked
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1335047 13f79535-47bb-0310-9956-ffa450edef68
it would call String.getBytes(), without specifying an encoding. That
meant that the platform default encoding would be used, which might
change between different installs(if someone changed an environment
variable, for instance). Now, there are explicit variants to be called.
When creating a new value, use cryptValueUTF8. If, for some reason,
calling code is doing it's own comparison, it must continue to use
cryptValueBytes(password.getBytes()).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334170 13f79535-47bb-0310-9956-ffa450edef68
go thru a deprecation cycle for this, as this method was only recently
added, and has never been officially released.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1333664 13f79535-47bb-0310-9956-ffa450edef68
This patch will enable NOT-IN operator to the performFind service.
Only two lines of the file framework/common/src/org/ofbiz/common/FindServices.java were modified to enable de NOT-IN operator.
An use case is provided to test
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1328637 13f79535-47bb-0310-9956-ffa450edef68
A hideResultInLog service attribute is added. If set to true the service result will be hidden from possible exposition in ServiceDispatcher.runSync()
This is convenient when used for sending a password to an user (the password must be legible in the sent mail).
I'm sure a lot of you would want to have no logs at all in production. But by experience I know that we need to log info in logs even in production. Especially when the system is quickly moving ahead...
So this is a sure mean to hide any password in logs, being current or backuped somewhere on the servers disks...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1328122 13f79535-47bb-0310-9956-ffa450edef68
1. add datetimepicker language file to system: jquery-ui-timepicker-zh-CN.js, jquery-ui-timepicker-zh-HK.js and jquery-ui-timepicker-zh-TW.js.
2. also add a "jquery-ui-timepicker-en.js" file, it's the default datetimepicker language file but not exist now.
3. run service "createJsLanguageFileMapping" to update sLanguageFileMapping.java accordingly.
jleroux: not sure "jquery-ui-timepicker-en.js" is really needed, but cleaner for sure
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1201229 13f79535-47bb-0310-9956-ffa450edef68
Just found by chance while looking for consistency in JsLanguageFileMappingCreator class after refactoring
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1182858 13f79535-47bb-0310-9956-ffa450edef68
In r1178199, I missed to use the default DateTime file (jquery.ui.datepicker-en.js) being still with the idea that it was handled internally.
I have also refactored/simplified JsLanguageFileMappingCreator class and put comments to better explain how all that works
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1182731 13f79535-47bb-0310-9956-ffa450edef68
Fixes the problem by:
* Updating datetimepicker from 0.9.3 to 0.9.6 (where a localization folder exists)
* Use the fantastic createJsLanguageFileMapping service Sascha introduced (I just removed the confusing wrong comment about JsLanguageFilesMapping.ftl being generated and added a block for datetimepicker, also in JsLanguageFileMappingCreator.java). A very good dynamic+static tool, kudos Sascha!
Should work also in eCommerce though I did not found any uses
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1178199 13f79535-47bb-0310-9956-ffa450edef68
In the createJsLanguageFileMapping service, the catch blocks have assigns to a local variable in a return statement.
Simplified further on Adrian's advice.
jleroux: I have also organized imports
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1172342 13f79535-47bb-0310-9956-ffa450edef68
Some value assignments to local variables without reading or using it.
jleroux: indeed I don't see any reasons to set the size of a byte array before feeding it with String.getBytes(), since NPE is handled above. I have even simplified it more using function composition style.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1172015 13f79535-47bb-0310-9956-ffa450edef68
It uses "locale" (e.g. zh_TW) to form the jquery.ui.datepicker file name in method JsLanguageFileMappingCreator.createJsLanguageFileMapping, but jquery uses dash ("-") instead of underscore ("_") to concat the language code and country code, such as zh-TW vs. zh_TW.
A very trivial update to JsLanguageFileMappingCreator.java, and after that, update the JsLanguageFileMapping.java file by running service "createJsLanguageFileMapping". In attached, contains both of patches to these two files.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1163533 13f79535-47bb-0310-9956-ffa450edef68
Reorganized and extend the Data structure, now it is possible to store additional country postal code regex data
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1153402 13f79535-47bb-0310-9956-ffa450edef68
Orig Msg: If you are on this page https://demo-trunk.ofbiz.apache.org:8443/ecommerce/control/newcustomer select USA from the country drop down and it will display all the USA states, similarly it works just fine for Spain but if you try once again with either United Kingdom or France it will show "No States/Provinces exist".
Both UK and France have Counties saved in the datamodel but the form does not lookup in the correct location as they are not defined as State.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1140103 13f79535-47bb-0310-9956-ffa450edef68