Sascha Rodekamp
082526b9de
FIX: Wrong use of toArray() method ( https://issues.apache.org/jira/browse/OFBIZ-4425 ). A patch from Dimitri Unruh which replaces Array Casts with a propper call of the toArray method.
...
String[] temp = (String[]) foo.toArray(); <-- may cause class cast exception it is better to use: String[] temp = foo.toArray(new String[foo.size()])
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1173607 13f79535-47bb-0310-9956-ffa450edef68
2011-09-21 12:53:35 +00:00
Jacques Le Roux
00afa0c283
A patch from Dimitri Unruh "Some dead variable assignments " https://issues.apache.org/jira/browse/OFBIZ-4426
...
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
2011-09-17 16:51:38 +00:00
Sascha Rodekamp
16607bb1ac
UPDATE: Some improvements with Map iterations ( https://issues.apache.org/jira/browse/OFBIZ-4415 ) A patch from Dimitri Unruh which improves some Map Iterations.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1170525 13f79535-47bb-0310-9956-ffa450edef68
2011-09-14 10:52:01 +00:00
Sascha Rodekamp
5a0b643c39
Building a String using concatenation in a loop ( https://issues.apache.org/jira/browse/OFBIZ-4416 ). A patch from Dimitri Unruh: In UtilValidate.java some methods building a String using concatenation in a loop. We can obtaine better performance by using a StringBuilder
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1170520 13f79535-47bb-0310-9956-ffa450edef68
2011-09-14 10:37:53 +00:00
Adrian Crum
79110878f1
Have FlexibleMapAccessor and FlexibleStringExpander implement IsEmpty so they can be evaluated by the various validation utilities.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1170125 13f79535-47bb-0310-9956-ffa450edef68
2011-09-13 11:51:49 +00:00
Jacques Le Roux
e497883d62
VCard.java: replaec an UtilValidate.isNotEmpty() by a simple isEmpty()
...
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
2011-09-12 14:13:17 +00:00
Jacques Le Roux
a7f92ce35f
Fix a bug introduced in r1169478
...
Thanks to Hans for reporting on dev ML
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1169701 13f79535-47bb-0310-9956-ffa450edef68
2011-09-12 11:47:15 +00:00
Jacques Le Roux
2b712efb98
No functional changes, simple code refactoring around UtilValidate.is(Not)Empty()
...
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
2011-09-11 17:06:11 +00:00
Jacques Le Roux
b01369ef25
Migration to Tomcat 6.0.33 due to a security issue in previous revisions, see http://tomcat.apache.org/download-60.cgi#6.0.33
...
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
2011-09-04 22:44:50 +00:00
Jacques Le Roux
30b4566a7c
Revert r1165076 (at Adrian's right demand)
...
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
2011-09-04 19:07:16 +00:00
Jacques Le Roux
fd92b0eca1
Closes https://issues.apache.org/jira/browse/OFBIZ-4201
...
"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
2011-09-04 17:08:54 +00:00
Adrian Crum
fb9ae9ffb5
Added some Calendar<->Date data type converters. Commit includes some unintended code formatting.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1164906 13f79535-47bb-0310-9956-ffa450edef68
2011-09-03 18:36:39 +00:00
Jacques Le Roux
0fe66fb067
http://jakarta.apache.org/regexp/ is now deprecated in favor of java.util.regexp. I don't see any use of org.apache.regexp in OFBiz code OOTB, so removing
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1153682 13f79535-47bb-0310-9956-ffa450edef68
2011-08-03 21:44:52 +00:00
Adrian Crum
752b4b5b8a
Downgraded iCal4j jar file to ver 1 RC2 because ver 1 RC3 and greater is throwing exceptions. I will look into this more later.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1151623 13f79535-47bb-0310-9956-ffa450edef68
2011-07-27 20:56:10 +00:00
Hans Bakker
12b2e145c8
https://issues.apache.org/jira/browse/OFBIZ-4337 : HttpClient does not support UTF-8 Patch By Chatree with comments from Adrian and Scott
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1145854 13f79535-47bb-0310-9956-ffa450edef68
2011-07-13 04:10:25 +00:00
Adam Heath
b98a7f111c
FEATURE: Add a global executor, to be used during config type parsing.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1141288 13f79535-47bb-0310-9956-ffa450edef68
2011-06-29 22:12:31 +00:00
Adam Heath
62e143afa2
OPTIMIZE: Turn off some additional debug log calls for
...
catalina-related sources.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139853 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:07:29 +00:00
Adam Heath
7047b2b80b
FEATURE: Add support to Debug.logFoo() for using %-style format
...
strings.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139852 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:07:24 +00:00
Adam Heath
07e802c9d8
FEATURE: Add helper method to fetch the results of all futures in a
...
collection, into a new list.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139699 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 02:50:41 +00:00
Adam Heath
276ecca353
FEATURE: Allow the ThreadGroup to be specified for created threads.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139698 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 02:50:35 +00:00
Adam Heath
cb0f5a3b46
FEATURE: if the threadCount passed to getExecutor is negative, then use
...
the abs() value of that times the number of cpus, to specify the actual
number of threads.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139697 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 02:50:29 +00:00
Adam Heath
22ebafd3de
FEATURE: Add a flag to getExecutor that specifies whether to prestart
...
the threads in the pool.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139696 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 02:50:23 +00:00
Adam Heath
2a0c3c3fc7
OPTIMIZE: getExecutor now calls createThreadFactory, instead of creating
...
one itself.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139695 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 02:50:17 +00:00
Adam Heath
920ed26326
Fix broken 1078215, the object instance variable was removed, because
...
dumb smart code editors thought it was unused. Please understand the
code you change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139396 13f79535-47bb-0310-9956-ffa450edef68
2011-06-24 18:16:55 +00:00
Marco Risaliti
f5284f787a
Fix a javadoc warning into ContainerLoader
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1128028 13f79535-47bb-0310-9956-ffa450edef68
2011-05-26 18:46:35 +00:00
Marco Risaliti
acc8ecf6a3
Removed the method UtilNumber.stringToBigDecimal and the references in webpos component
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1127651 13f79535-47bb-0310-9956-ffa450edef68
2011-05-25 19:45:44 +00:00
Marco Risaliti
a153d0a34f
Removed some javadoc warning (wrong param/return) into framework components no functional changes
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1126708 13f79535-47bb-0310-9956-ffa450edef68
2011-05-23 20:11:12 +00:00
Jacques Le Roux
a26929f6b8
Correct indentation for r1126379
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1126399 13f79535-47bb-0310-9956-ffa450edef68
2011-05-23 09:10:57 +00:00
Jacques Le Roux
7e900f23b3
A patch from Philippe Mouawad "UtilCache#getPropertyParam should test property existence instead of rely on MissingResourceException" https://issues.apache.org/jira/browse/OFBIZ-4290
...
UtilCache#getPropertyParam should call res.containsKey instead of relying on catching MissingResourceException, which will reduce number of Exceptions created so CPU.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1126379 13f79535-47bb-0310-9956-ffa450edef68
2011-05-23 08:33:42 +00:00
Marco Risaliti
65d922b529
Change a wrong class name in the base test suite to be executed
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1125971 13f79535-47bb-0310-9956-ffa450edef68
2011-05-22 14:17:08 +00:00
Marco Risaliti
0291aa60d8
Change a wrong package name in the test suite to be executed
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1125970 13f79535-47bb-0310-9956-ffa450edef68
2011-05-22 14:11:55 +00:00
Marco Risaliti
c4c446369c
Webpos2 improved version (OFBIZ-4287)
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1125951 13f79535-47bb-0310-9956-ffa450edef68
2011-05-22 13:11:17 +00:00
Jacques Le Roux
c35abeb2cd
Adds ant-contrib-1.0b3.jar
...
Replaces the <if> task (used javascript in a file with .py suffix :/ ). I kept it commented out for now, in case someone is using it (not used OOTB)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1100795 13f79535-47bb-0310-9956-ffa450edef68
2011-05-08 19:18:27 +00:00
Jacques Le Roux
2653806a87
Fixes some other forgotten formatting issues in previous commit (r1100130). And Mostly removes an useless duplicated snippet
...
<<A patch from Philippe Mouawad "ResourceBundleMapWrapper memory usage improvement" https://issues.apache.org/jira/browse/OFBIZ-4268
Patch that creates the Map only when it is required>>
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1100138 13f79535-47bb-0310-9956-ffa450edef68
2011-05-06 08:53:52 +00:00
Jacques Le Roux
cc7ee5ea71
Fixes some forgotten formatting issues in previous commit (r1100127). Due to tabs in patch.
...
<<A patch from Philippe Mouawad "ResourceBundleMapWrapper memory usage improvement" https://issues.apache.org/jira/browse/OFBIZ-4268
Patch that creates the Map only when it is required>>
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1100130 13f79535-47bb-0310-9956-ffa450edef68
2011-05-06 08:23:43 +00:00
Jacques Le Roux
9516b43bc7
A patch from Philippe Mouawad "ResourceBundleMapWrapper memory usage improvement" https://issues.apache.org/jira/browse/OFBIZ-4268
...
Patch that creates the Map only when it is required
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1100127 13f79535-47bb-0310-9956-ffa450edef68
2011-05-06 08:17:17 +00:00
Jacques Le Roux
545e828855
This is actually default values, better to keep them commented out as Chris Snow noticed some time ago in dev ml
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1098795 13f79535-47bb-0310-9956-ffa450edef68
2011-05-02 21:20:37 +00:00
Adrian Crum
891bc676f7
Updated HttpClient library to version 4.1. The newer version has a number of bug fixes and security fixes.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1097827 13f79535-47bb-0310-9956-ffa450edef68
2011-04-29 14:54:50 +00:00
Adrian Crum
f635a84fcb
Small code cleanup in Base64.java - no functional change.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1097824 13f79535-47bb-0310-9956-ffa450edef68
2011-04-29 14:46:18 +00:00
Jacques Le Roux
2b97e68c4f
Put a doc about this unimplemented tag. A guy in the team thought it could rely on it for data loading order.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1097382 13f79535-47bb-0310-9956-ffa450edef68
2011-04-28 09:40:43 +00:00
Adrian Crum
f7176d28e1
Updated ical4j library.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1090822 13f79535-47bb-0310-9956-ffa450edef68
2011-04-10 15:59:09 +00:00
Bruno Busco
e5e4b73a82
Better Italian labels
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1090757 13f79535-47bb-0310-9956-ffa450edef68
2011-04-10 10:08:08 +00:00
Sascha Rodekamp
fb880c80a1
Update - i18n from DateTime display fields ( https://issues.apache.org/jira/browse/OFBIZ-4014 ). Ofbiz can now show and interprete i18n dates and times. The Patch uses the datejs library to i18n the displayd date and time fields from the datepicker this works vice versa.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1090231 13f79535-47bb-0310-9956-ffa450edef68
2011-04-08 13:05:42 +00:00
Andrew Zeneski
4d3223d2cc
added fall back to default date formatter when conversion fails before
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1089946 13f79535-47bb-0310-9956-ffa450edef68
2011-04-07 19:27:53 +00:00
Sascha Rodekamp
13cf8abcc4
Bug - Create (upload) content in Party Profile does not work ( https://issues.apache.org/jira/browse/OFBIZ-4179 ). The bug occurs when trying to upload a zip file. Tika was missing a class for dealing with zip files. I added commons-compress-1.1.jar. I also updated the UX for the upload function. When no file purpose was set the upload crashes. Therefore i added a field validation.
...
Orig. Msg.:
As it does not work in trunk I 1st thought it was a jQuery migration issue. But it does not work either in R9.04 and I guess this is the initial reason
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1087254 13f79535-47bb-0310-9956-ffa450edef68
2011-03-31 11:22:05 +00:00
Adrian Crum
3855697825
Moved nested class in Start.java to its own file - no functional change. This commit changes the StartupLoader API.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1085757 13f79535-47bb-0310-9956-ffa450edef68
2011-03-26 16:29:15 +00:00
Adrian Crum
355cc6a59e
Fix framework/base tests that were not running. Patch from Bob Morley with a few changes by me - https://issues.apache.org/jira/browse/OFBIZ-3662 .
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1085735 13f79535-47bb-0310-9956-ffa450edef68
2011-03-26 15:11:00 +00:00
Erwan de Ferrieres
ddea2b9136
OFBIZ-4220 a patch from Philippe Mouawad: Current implementation of UtilCache has a memory leak if maxInMemory is set
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1084732 13f79535-47bb-0310-9956-ffa450edef68
2011-03-23 20:44:17 +00:00
Adrian Crum
397889ae8f
Some work on ContainerLoader.java - Fixes some thread-safe issues and try to have better control over loading/starting/stopping containers.
...
I'm not sure what the Geronimo code was supposed to do. It appeared to load all of the containers just so it could create/start the rmi-dispatcher container. So, I created a static method that allows client code to get a specific container. If this change causes problems with Geronimo just let me know and I will fix it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1084238 13f79535-47bb-0310-9956-ffa450edef68
2011-03-22 16:22:54 +00:00
Adrian Crum
c0ae7cfde6
More Container.java JavaDocs - no functional change.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1084202 13f79535-47bb-0310-9956-ffa450edef68
2011-03-22 14:51:46 +00:00