Commit Graph
760 Commits
Author SHA1 Message Date
Adrian Crum eff5f89d39 Simplified Scott's FlexibleStringExpander NPE fix and updated the JavaDocs.
Many thanks to Scott for catching that, and many thanks to David Jones for his suggestions on the refactor.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@688348 13f79535-47bb-0310-9956-ffa450edef68
2008-08-23 15:56:17 +00:00
Scott Gray eb425ac447 NPE fix
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@688296 13f79535-47bb-0310-9956-ffa450edef68
2008-08-23 11:15:23 +00:00
Adrian Crum 3ac5d11bb9 Added some synchronization code to FlexibleStringExpander.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@687900 13f79535-47bb-0310-9956-ffa450edef68
2008-08-21 23:34:59 +00:00
Adrian Crum 65d194a557 Changed UtilObject.getByteCount(Object obj) exception handling to log verbose, since exceptions are regularly thrown and they were clogging up the console log.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@687884 13f79535-47bb-0310-9956-ffa450edef68
2008-08-21 22:31:58 +00:00
Adrian Crum 4172761060 More FlexibleMapAccessor.java fixups.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@687842 13f79535-47bb-0310-9956-ffa450edef68
2008-08-21 20:09:48 +00:00
Adrian Crum df34ed93d5 A small tweak of the FlexibleStringExpander.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@687500 13f79535-47bb-0310-9956-ffa450edef68
2008-08-20 23:12:39 +00:00
Adrian Crum 3aa803f9bc Small fix for UtilObject. The getByteCount(Object obj) method was returning unusual results for non-serializable objects. I also added an explanatory note in the JavaDoc.
An interesting article on getting the size of Java objects - http://www.javaworld.com/javaworld/javaqa/2003-12/02-qa-1226-sizeof.html?page=1.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@687473 13f79535-47bb-0310-9956-ffa450edef68
2008-08-20 21:33:52 +00:00
Adrian Crum ead3169d5c FlexibleStringExpander refactor.
1. Improved parsing logic - the entire expression is pre-parsed now.
2. Factory method stores parsed expressions in the cache.
3. Single null/empty expression instance - saves on memory.
4. Class names and variable names shortened to reduce object size.
5. Small performance improvements.

The expression cache is set up with no limit. We'll have to see if that needs to be changed. Larger installations might need to limit the expression cache size.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@687422 13f79535-47bb-0310-9956-ffa450edef68
2008-08-20 18:50:04 +00:00
Adam Heath c3054529c9 Allow joining of any item, not just string.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@686845 13f79535-47bb-0310-9956-ffa450edef68
2008-08-18 18:51:08 +00:00
Jacques Le Roux e7905f2c8c Fix the anti-pattern
if (* != null && *.size() > 0) { 
where * is a variable name (String or Collection). Rewritten to
    if (UtilValidate.isNotEmpty(*)) {

Done with Eclipse regex replace feature with
search = if \((\w+) *!= *null *&& *(\w+)\.size\(\) *> *0\) *\{
replace = if (UtilValidate.isNotEmpty($1)) {

And of course some hand-work for imports and cleaning. I compiled and tested with ant run-tests

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@686591 13f79535-47bb-0310-9956-ffa450edef68
2008-08-17 07:47:18 +00:00
Adam Heath e410552cc9 No longer *copy* the extra support files into the classes dir;
instead, just add them straight to the final jar.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@685934 13f79535-47bb-0310-9956-ffa450edef68
2008-08-14 15:08:14 +00:00
Adam Heath 8328cfc565 Don't make base/start subdirs in build/classes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@685783 13f79535-47bb-0310-9956-ffa450edef68
2008-08-14 06:16:19 +00:00
Adam Heath 2617681b51 Remove svn:executable on a bunch of stuff.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@684389 13f79535-47bb-0310-9956-ffa450edef68
2008-08-10 00:53:43 +00:00
Adam Heath 90426d4b6d Split framework/base into framework/start; now all components have
exactly the same type of layout.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@684377 13f79535-47bb-0310-9956-ffa450edef68
2008-08-09 23:38:36 +00:00
Hans Bakker 0e16880a69 added buffer conversion which is required by the persistContentAndAssoc service to store email attachments
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@683752 13f79535-47bb-0310-9956-ffa450edef68
2008-08-07 23:42:38 +00:00
Jacopo Cappellato 853ed7f633 Formatting and code cleanups after last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682657 13f79535-47bb-0310-9956-ffa450edef68
2008-08-05 09:54:05 +00:00
Jacques Le Roux bfc0ea779c A patch from Marco Ruocco solving an issue on Windows : File.separator in Windows system is "\", that is, also, the first character of an escape sequence. So the replaceAll method expects another char after that.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682652 13f79535-47bb-0310-9956-ffa450edef68
2008-08-05 09:36:52 +00:00
Adam Heath 99bf46f085 Switch most new File(string_with_path_separator) calls to
FileUtil.getFile.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682266 13f79535-47bb-0310-9956-ffa450edef68
2008-08-04 06:08:42 +00:00
Adam Heath 7ee96bdc1f Utility methods that convert string file paths to File objects.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682261 13f79535-47bb-0310-9956-ffa450edef68
2008-08-04 05:47:26 +00:00
Adam Heath 60b7afc406 Add a variant of isValidDatabaseId that takes a StringBuilder.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682244 13f79535-47bb-0310-9956-ffa450edef68
2008-08-04 02:34:55 +00:00
Adam Heath a4dcc6e653 getResourceBundleMap returns ResourceBundleMapWrapper instead of
Map<String, Object>; this way, callers don't have to explicitly
cast to the former when they need to.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682101 13f79535-47bb-0310-9956-ffa450edef68
2008-08-03 04:28:17 +00:00
Adam Heath ac55d75925 Final set of generics markup for base; base no longer has any
'unchecked' warnings.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682096 13f79535-47bb-0310-9956-ffa450edef68
2008-08-03 02:59:30 +00:00
Adam Heath 3cb25423a9 More misc. generics/java15 markup.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682054 13f79535-47bb-0310-9956-ffa450edef68
2008-08-02 21:35:29 +00:00
Adam Heath b6a1ae5e5e Another minor optimization; no longer need to specify classpathref in
all the build.xml files.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@681935 13f79535-47bb-0310-9956-ffa450edef68
2008-08-02 03:41:46 +00:00
Adrian Crum 1942cd9de9 ObjectType.java simpleTypeConvert(...) improvement - now converts Long to Date and back, and Long to Timestamp and back.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@681224 13f79535-47bb-0310-9956-ffa450edef68
2008-07-30 22:19:35 +00:00
David E. Jones 2ccff0b5d8 An option I've resisted for a while due to limited flexibility when used, but we have a lot of these common cases so this may be worth it; can now define CrUD services and not have to implement them for common cases; the create, update, and delete ExampleItem services now use this entity-auto implementation instead of explicit simple-methods; those are tested and are working, and other variations on create should too but I haven't tested them yet; this also includes various refactorings to expose nderlying tools in simple method code and make it reusable
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@679058 13f79535-47bb-0310-9956-ffa450edef68
2008-07-23 10:24:58 +00:00
Jacques Le Roux 89cbe8b368 A patch from Markus Studer ""german translations for framework - base, minilang, service, webapp" (https://issues.apache.org/jira/browse/OFBIZ-1878) - OFBIZ-1878
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@676947 13f79535-47bb-0310-9956-ffa450edef68
2008-07-15 16:02:31 +00:00
Jacques Le Roux 4f4b4e5e43 Revert previous change done unintentionnaly while testing Subclipse 1.4 new interface (so far I preferred the old one...)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@676279 13f79535-47bb-0310-9956-ffa450edef68
2008-07-13 08:45:11 +00:00
Jacques Le Roux 80c57126a0 New French labels
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@676274 13f79535-47bb-0310-9956-ffa450edef68
2008-07-13 08:21:54 +00:00
Jacques Le Roux 0f4984d1d4 Ooops, I just remember that the "list..." functions created in ProductDetail.bsh are always prefixed by "list" so the javascript reserved words check is not needed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@676227 13f79535-47bb-0310-9956-ffa450edef68
2008-07-12 19:52:31 +00:00
Adrian Crum 503c079510 Some minor improvements to the HttpClient class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@676206 13f79535-47bb-0310-9956-ffa450edef68
2008-07-12 17:52:04 +00:00
Jacques Le Roux 643078cc43 Fix "Problems in virtual product's detail page if productFeatureTypeId contain non alfa characters." (https://issues.apache.org/jira/browse/OFBIZ-230) - OFBIZ-230
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@676162 13f79535-47bb-0310-9956-ffa450edef68
2008-07-12 12:19:41 +00:00
Jacopo Cappellato 930970efd3 Upgraded (again) to Tomcat 6.0.16.
Upgraded commons-dbcp to the HEAD revision (from snapshot taken in 20071125): the upgrade of the dbcp jar seems to have fixed all the issues we were having with "OutOfMemoryError: Java heap space" exceptions.
Sorry for the noise (two big commits in the base and catalina components in the same day): hopefully this rather critical issue is now resolved (but I will continue my load tests).


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@674776 13f79535-47bb-0310-9956-ffa450edef68
2008-07-08 11:47:02 +00:00
Jacopo Cappellato 3fd79154a9 As a temp fix for issues with "OutOfMemoryError: Java heap space" errors reported after the upgrade of Tomcat, I'm downgrading from Tomcat 6.0.16 to Tomcat 5.5.23.
As soon as the issues is fixed we will commit back the code; this effort is tracked in OFBIZ-1863

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@674732 13f79535-47bb-0310-9956-ffa450edef68
2008-07-08 06:44:12 +00:00
Adrian Crum 97ba89b726 Small fixup for last commit - faster, safer code.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@674523 13f79535-47bb-0310-9956-ffa450edef68
2008-07-07 15:18:35 +00:00
Adrian Crum 1f39a762bc Improved screen widget UI label rendering - now expands expressions contained in UI labels (${...}).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@674387 13f79535-47bb-0310-9956-ffa450edef68
2008-07-07 03:21:18 +00:00
Adrian Crum 4bd597df22 FreeMarkerWorker.java improvements:
1. Better handling of the FreeMarker Configuration instance. Eliminated the need for synchronizing code.
2. OFBiz transforms are now kept in the Configuration object - no need to load them into the rendering context on every run.
3. Some small code cleanups.

FreeMarkerViewHandler.java improvements:

1. Eliminated redundant Configuration object initialization by cloning the Configuration object kept in FreeMarkerWorker.
2. Now supports the "component://" syntax for page attribute.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@674222 13f79535-47bb-0310-9956-ffa450edef68
2008-07-05 18:43:21 +00:00
Jacopo Cappellato 68653b2507 Upgrade to Jetty container version 6.1.11
Based on the work and patch by Joe Eckard: OFBIZ-1791

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@673425 13f79535-47bb-0310-9956-ffa450edef68
2008-07-02 15:48:33 +00:00
Adam Heath 9a8f3eb14b Add checkStack variants.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672903 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 20:41:20 +00:00
David E. Jones 3797437015 Changed to support a default-group-name per delegator, so that they don't have to specified for each entity; also some cleanups of the DelegatorInterface to remove deprecated stuff and add some new things, I still don't think that needs to exist but oh well
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672821 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 17:04:43 +00:00
Adam Heath f8581e214d Add another helper method to hide generics warnings.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672804 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 16:05:01 +00:00
Adam Heath 795970df99 Use more Number.valueOf instead of creating new values all the time.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672703 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 04:39:50 +00:00
Adam Heath 2fabc92b17 Generied.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672700 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 04:32:58 +00:00
Adam Heath 9852126ed8 Based on what David discovered, made a correct fix; If srcdir and
<src> are both specified for <javac>, then they are added together,
instead of the latter overridding the former.  So, to override the
global src attribute in the javac macros, either set it explicitly
when called, or set it to empty, then use the nested <src> elements.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672699 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 04:27:54 +00:00
Adam Heath 124f1ed72d Revert previous change to just this file; some issue with the version
of log4j being compiled against.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672686 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 00:52:30 +00:00
Adam Heath 18391f98a9 The build.xml files are now much smaller and simpler; they reuse a
few global definitions.  1585 lines removed.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672657 13f79535-47bb-0310-9956-ffa450edef68
2008-06-29 18:39:36 +00:00
Jacopo Cappellato dbd34520d7 Cleaned up a bunch of warning messages for deprecated methods; in preparation for the framework release.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@671223 13f79535-47bb-0310-9956-ffa450edef68
2008-06-24 15:47:28 +00:00
Jacopo Cappellato d86e8129de Applied part of patch created by Joe Eckard in OFBIZ-1791: server info strings returned by the ServletContext are now compared ignoring case.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@671054 13f79535-47bb-0310-9956-ffa450edef68
2008-06-24 08:02:30 +00:00
David E. Jones 91a5ff11ff Removed old funny hex encode and decode routines from StringUtil, as they produced the same results as the commons library; found and fixed the real problem with the old entity engine encryption so that encrypted fields, including credit card numbers, couldn't be decrypted with the new code and it was the hashed key names no longer matched so the wrong DES key was used, ie a different one from the original key used to encrypt even if the original key was still in there; now it tries both, which is necessary because for systems updated before this went in there will be entries using the old DES key and some using the new DES key, so we can't just try one or the other; this should fix problems with credit cards and other encrypted value decryption after updating to fix the password hashing problem from a few weeks ago
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@670731 13f79535-47bb-0310-9956-ffa450edef68
2008-06-23 20:15:27 +00:00
Jacques Le Roux 10676abb06 A patch from Michael Brohl "Configure cookie use for a module through the ofbiz-component.xml" (https://issues.apache.org/jira/browse/OFBIZ-1831) - OFBIZ-1831
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@670268 13f79535-47bb-0310-9956-ffa450edef68
2008-06-21 23:02:59 +00:00