Commit Graph
2421 Commits
Author SHA1 Message Date
Erwan de Ferrieres 05c9bae6e5 tabs to spaces, no functional changes - java files
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1230478 13f79535-47bb-0310-9956-ffa450edef68
2012-01-12 10:37:35 +00:00
Erwan de Ferrieres 337aa79464 OFBIZ-3651 - Minor tweaks to the Cobertura integration - A patch from Bob Morley. I've also changed the cobertura version from 1.9.3 to 1.9.4.1 (latest) as your modifications are allowing it
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1230444 13f79535-47bb-0310-9956-ffa450edef68
2012-01-12 09:01:06 +00:00
Adrian Crum 6067eec6ef FreeMarkerWorker JavaDocs - no functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1228592 13f79535-47bb-0310-9956-ffa450edef68
2012-01-07 10:26:52 +00:00
Jacques Le Roux ae3205204e A patch from Martin Kreidenweis "Deserialization of arrays with UtilObject.getObject() throws ClassNotFoundException" https://issues.apache.org/jira/browse/OFBIZ-4295
Deserialization of arrays with UtilObject.getObject() throws a ClassNotFoundException. This happened to us when we enabled the distributed cache clear feature and it was sending arrays of EntityExpr objects to other OFBiz instances.

The reason is, that the org.ofbiz.base.util.ObjectInputStream calls classLoader.loadClass(name) directly instead of using Class.forName(name, init, classLoader).
According to java bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6446627 ClassLoader.loadClass() is not intended to being used this way and doesn't support loading arrays.

jleroux: Sun/Oracle is pretty clear about that <<[When you want to reflectively load a class by name initiated using a specific class loader, you should not invoke that loader's public loadClass method directly-- instead, you should always use the static three-argument Class.forName method.  The ClassLoader.loadClass instance method is more intended for delegation from one class loader to another within a class loading operation (although this is a common confusion and not well described in the documentation).  In other words, replace L.loadClass(N) with Class.forName(N,false,L).  The Class.forName invocation may eventually end up invoking loadClass on the specified loader, but only after taking care of some other aspects of the VM's standard symbolic class name resolution process-- the significant bit in this case being the support for loading/creation of array classes.]>> More at the link above


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1226223 13f79535-47bb-0310-9956-ffa450edef68
2012-01-01 09:57:50 +00:00
Erwan de Ferrieres b2f285eb47 Upgrading tomcat to version 7.0.23 - changelog @ http://tomcat.apache.org/tomcat-7.0-doc/changelog.html
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1225271 13f79535-47bb-0310-9956-ffa450edef68
2011-12-28 18:44:59 +00:00
Hans Bakker fb504ca2d4 upgrade ant to rev 1.8
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1222547 13f79535-47bb-0310-9956-ffa450edef68
2011-12-23 04:08:15 +00:00
Jacques Le Roux f663e9b57b Yesterday, late and in a hurry, I hastily committed r1212673. It was failing after an ant clean. But I did not see, because I did not do an ant clean, and Builbot did not report any issues (yes, I sometimes rely on it). Actually it was because Buildbot tests fails since r1212266, and it only sends info when it switches from bad to good, or vice-versa.
Fortunately, on my side, it was an easy fix: I just forgot to re-add the old strToMap(String str, boolean trim) signature.

So here it is

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1212749 13f79535-47bb-0310-9956-ffa450edef68
2011-12-10 08:55:27 +00:00
Hans Bakker 05909bfc1b revert 1212673 because of compile error
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1212706 13f79535-47bb-0310-9956-ffa450edef68
2011-12-10 01:24:44 +00:00
Jacques Le Roux ade4ac0468 Improves StringUtil.strToMap() by adding a delimiter as parameter
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1212673 13f79535-47bb-0310-9956-ffa450edef68
2011-12-09 22:50:01 +00:00
Jacques Le Roux 5ac6c5f240 Better comment, no functional changes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1209927 13f79535-47bb-0310-9956-ffa450edef68
2011-12-03 15:01:55 +00:00
Hans Bakker 64befbc96a Revert 1205710 on a comment from Adrian
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1206043 13f79535-47bb-0310-9956-ffa450edef68
2011-11-25 02:59:40 +00:00
Hans Bakker d4fa24f6a6 getDayEnd will have a null pointer exception when the offset is not provided. This can cause very strange behaviour in the system when people forget to enter a value in terms. When not provided zero is assumed now
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1205710 13f79535-47bb-0310-9956-ffa450edef68
2011-11-24 02:54:14 +00:00
Hans Bakker 6a52e4e75c upgrade tomcat from 6 -> 7 more detail at: https://issues.apache.org/jira/browse/OFBIZ-4563
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1203470 13f79535-47bb-0310-9956-ffa450edef68
2011-11-18 03:06:17 +00:00
Sascha Rodekamp db199e87d8 IMPROVEMENT: Replace String == null with UtilValidate.isEmpty() (https://issues.apache.org/jira/browse/OFBIZ-4546). A patch from Dimitri Unruh: In UtilDateTime are some String == null comparisons. I replaces them with UtilValidate.isEmpty()
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1200231 13f79535-47bb-0310-9956-ffa450edef68
2011-11-10 09:15:01 +00:00
Adrian Crum c1381a112d UtilFormatOut.java date and date-time format methods provided by Dimitri Unruh, with JavaDocs added by me - https://issues.apache.org/jira/browse/OFBIZ-4545.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1199793 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 15:26:53 +00:00
Adrian Crum b38bcae737 Added a FIXME comment to some non-thread-safe code in UtilFormatOut.java. No time to fix it right now.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1198702 13f79535-47bb-0310-9956-ffa450edef68
2011-11-07 11:05:13 +00:00
Ashish Vijaywargiya 0ec8f44676 Bug fix: Applied patch from jira issue OFBIZ-4441. UtilXml firstChildElement should use getNodeName instead of getLocalName.
We have observed the same issue in past and provided a patch for the same. For more details please refer the commit r995384.

Fixing bug of reading node name. When we read first child element of the response of any third party integration for example ups etc, node name can't be read using "node.getLocalName()". So changing  node.getLocalName() --> node.getNodeName().

This time before I revert my changes I will wait for Bilgin's comment to understand the exact problem with SOAP call due to which he did this changes. Bilgin please post your comment on this as soon as you get a chance.
http://svn.apache.org/viewvc?view=revision&revision=894359 

Thanks Kiran, Sascha for the contribution. We were also observing this issue since quite long so for now it is better to put the code in trunk and releasebranch. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1183314 13f79535-47bb-0310-9956-ffa450edef68
2011-10-14 11:39:19 +00:00
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