Adam Heath
1a76c84a76
Add helper method for finding UtilCaches by name. Closes
...
https://issues.apache.org/jira/browse/OFBIZ-1301
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585656 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:00:49 +00:00
Adam Heath
fdd427b037
Use auto-boxing/unboxing for default indices. Closes
...
https://issues.apache.org/jira/browse/OFBIZ-1299
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585654 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 19:58:25 +00:00
Adam Heath
fa24abccba
Creating a new Integer/Long, checking against null, then getting the
...
underlying value is an odd way to parse a string into a number. It's
better to just call parseInt/parseLong. Closes
https://issues.apache.org/jira/browse/OFBIZ-1300
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585653 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 19:56:32 +00:00
Adam Heath
9490ed60f8
Move the hasExpired logic into CacheLine. Closes
...
https://issues.apache.org/jira/browse/OFBIZ-1295
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585647 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 19:52:19 +00:00
Adam Heath
397ea18a52
In clearInitialContext(), there's no reason to call get, then remove;
...
just call remove directly. Closes
https://issues.apache.org/jira/browse/OFBIZ-1327
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585646 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 19:49:38 +00:00
Adam Heath
3eede5c55b
Use FastMap/Map instead of Hashtable/Dictionary. Closes
...
https://issues.apache.org/jira/browse/OFBIZ-1326
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585644 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 19:43:55 +00:00
Adam Heath
25355eef63
Switch from LinkedMap to LinkedHashMap. Closes
...
https://issues.apache.org/jira/browse/OFBIZ-1334
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585641 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 19:42:06 +00:00
Adam Heath
d3172979ca
Use FastMap instead of HashMap. Closes
...
https://issues.apache.org/jira/browse/OFBIZ-1325
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585614 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 18:11:41 +00:00
Adam Heath
394a9508da
Java 1.5 markup. Closes https://issues.apache.org/jira/browse/OFBIZ-1312
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585613 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 18:09:32 +00:00
Adam Heath
bf5df1cc51
Use System.arraycopy to copy the loaderArgs array. Closes
...
https://issues.apache.org/jira/browse/OFBIZ-1309
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585612 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 18:07:29 +00:00
Adam Heath
9892eec19e
Implement tri-state status management. The server status can now be
...
"Starting", "Running", or "Stopped". I didn't implement "Stopping",
because it never was a problem for me. Closes
https://issues.apache.org/jira/browse/OFBIZ-1297
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585607 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 17:56:23 +00:00
Adam Heath
478512ead6
Start the listener thread as soon as possible, so that the startup
...
status can be queried. Before, it would be started very late in the
process, so it wasn't possible to see if java/ofbiz was actually
running. Closes https://issues.apache.org/jira/browse/OFBIZ-1293
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585605 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 17:52:44 +00:00
Adam Heath
7ca8f182a6
Switch toString to StringBuilder, from StringBuffer. Closes
...
https://issues.apache.org/jira/browse/OFBIZ-1311
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585602 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 17:49:08 +00:00
Adam Heath
4e3a18d10a
Use StringBuilder instead of string addition. Closes
...
https://issues.apache.org/jira/browse/OFBIZ-1339
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585600 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 17:47:11 +00:00
Adam Heath
1bf01bff57
Use ?: trinary for looking up NumberFormats. Closes
...
https://issues.apache.org/jira/browse/OFBIZ-1340
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585597 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 17:45:11 +00:00
Adam Heath
c38212a6c3
Use Number.valueOf instead of new Number in simpleTypeConvert.
...
Closes https://issues.apache.org/jira/browse/OFBIZ-1337
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585596 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 17:40:55 +00:00
Adam Heath
bcb983355d
Make indexString use it's index variable(i), instead of always
...
using 0. Closes: https://issues.apache.org/jira/browse/OFBIZ-1338
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585594 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 17:37:24 +00:00
Adam Heath
7197b591b8
Make addComponent(String) call addComponent(File). Closes
...
https://issues.apache.org/jira/browse/OFBIZ-1310
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585590 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 17:34:48 +00:00
Adam Heath
cea96fee92
In simpleTypeConvert, where ever there was an if block that returned
...
TRUE/FALSE, they are now inlined, using ?:. Closes
https://issues.apache.org/jira/browse/OFBIZ-1336 ,
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585589 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 17:32:47 +00:00
Adam Heath
3a0a201c34
Add internString(), which protects against NPE. Closes
...
https://issues.apache.org/jira/browse/OFBIZ-1307 .
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585578 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 17:12:17 +00:00
Adam Heath
ddbcbed6d1
Remove was returning the *new* object, instead of the *old*. Closes
...
https://issues.apache.org/jira/browse/OFBIZ-1322 .
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585571 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 16:50:03 +00:00
Adam Heath
fa3a837161
Implement the 2 other write variants, so that block-writing is
...
more efficient. Closes https://issues.apache.org/jira/browse/OFBIZ-1323
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585557 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 16:26:45 +00:00
Adam Heath
69335961ab
When sending a command to a running ofbiz instance, and waiting for
...
the response from the server, the socket is not ready; explicitly
checking for that will always fail. This was the cause of the 'null'
messages during shutdown. Applied patch from
https://issues.apache.org/jira/browse/OFBIZ-1282 to fix the issue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585526 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 14:53:07 +00:00
Adam Heath
1051352f0f
Make all paths in these files relative; they no longer include
...
${ofbiz.home}. Closes:
https://issues.apache.org/jira/browse/OFBIZ-1290 .
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585525 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 14:45:26 +00:00
Adam Heath
60d06ecee8
toString() would always append the first classpath element, for each
...
element in it's list; in other words, it wasn't using the loop index
variable i, but was using the constant 0 each time. Closes:
https://issues.apache.org/jira/browse/OFBIZ-1308 .
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585523 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 14:39:12 +00:00
Adam Heath
e481905579
getKeyFromMemory() wasn't incrementing currentIdx during the loop;
...
this means it would only ever be able to return the first key from
memory. Resolves https://issues.apache.org/jira/browse/OFBIZ-1298 .
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585522 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 14:33:34 +00:00
Adam Heath
bca4f0d9cf
If a path in ofbiz-component.xml is not absolute, try to load the
...
sub-files relative to the location of the ofbiz-component.xml file.
This is from https://issues.apache.org/jira/browse/OFBIZ-1280 .
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585518 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 14:26:43 +00:00
Adam Heath
201dca4f1e
Update ofbiz.jar at the top-level whenever framework/base is built.
...
Also, clean said file at the same time. Based on patch from
https://issues.apache.org/jira/browse/OFBIZ-1283 .
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585267 13f79535-47bb-0310-9956-ffa450edef68
2007-10-16 21:31:21 +00:00
Jacopo Cappellato
79422be8d1
Issue OFBIZ-668
...
1) replaced the logic inside the isEmail method with a call to org.apache.commons.validator.EmailValidator.isValid(...)
2) I've left the code that returns true if the string is empty
3) the only remarkable difference is that the original code was accepting (by default) a domain without dots (user@localhost); the new code requires a real domain (user@domain.com )
Thanks to John Martin for the advices.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@583373 13f79535-47bb-0310-9956-ffa450edef68
2007-10-10 07:19:10 +00:00
Si Chen
4efd1f3554
Catch NPE in ResourceBundleMapWrapper.containsKey(Object)
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@581979 13f79535-47bb-0310-9956-ffa450edef68
2007-10-04 18:20:25 +00:00
David E. Jones
78f33e304e
Cleaned up how sync is done for cache in renderTemplateFromString, based on comments from Adrian Crum in Jira OFBIZ-1258
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@579571 13f79535-47bb-0310-9956-ffa450edef68
2007-09-26 10:34:26 +00:00
Si Chen
23be2b01f3
Fix bug in request-redirect when attributes contains error messages of type MessageString
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@578886 13f79535-47bb-0310-9956-ffa450edef68
2007-09-24 17:36:22 +00:00
Alfred Maxwell Byers
c7c2045158
Just implementing Adam's request.
...
Line 51 now looks like:
if (this.alias.equals(aliases[x])) {
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@577544 13f79535-47bb-0310-9956-ffa450edef68
2007-09-20 04:44:23 +00:00
David E. Jones
8da94ddff4
Changed to use FlexibleLocation so that for url resource loaders in component config files you can use the component:// style url for resources in components
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@576796 13f79535-47bb-0310-9956-ffa450edef68
2007-09-18 09:24:19 +00:00
Scott Gray
a1b604adf6
Changed all occurances of new BigDecimal("0") to BigDecimal.ZERO and likewise for BigDecimal.ONE
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@576773 13f79535-47bb-0310-9956-ffa450edef68
2007-09-18 08:30:58 +00:00
Alfred Maxwell Byers
eb03dea061
RenderTemplate was not working for .ftl files that are used as templates in CMS.
...
The "templateLocation" value in those cases is something like "DATARESOURCE:<id>"
and that causes makeReader(...) to fail.
renderTemplateFromString(...) still checks to see if a cached template exists, but
if it doesn't and since it has the template string, it builds the template from the
"templateString" and puts it in cashe.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@576766 13f79535-47bb-0310-9956-ffa450edef68
2007-09-18 08:07:29 +00:00
Andrew Zeneski
d327438d57
implemented junit xml formatted output to test cases; new options -results=filename default file outputs to runtime/logs/test-junit.xml
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@576686 13f79535-47bb-0310-9956-ffa450edef68
2007-09-18 04:27:14 +00:00
David E. Jones
ad308bf854
Small validation improvement
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@575853 13f79535-47bb-0310-9956-ffa450edef68
2007-09-15 02:07:03 +00:00
Jacopo Cappellato
fc8336c7a7
Updated log4j jar to latest release: this fixes the annoying NPE at startup.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@575675 13f79535-47bb-0310-9956-ffa450edef68
2007-09-14 13:37:24 +00:00
Andrew Zeneski
2b36eb82b6
upgraded javolution
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@574482 13f79535-47bb-0310-9956-ffa450edef68
2007-09-11 06:24:52 +00:00
David E. Jones
e6389beca1
Added handy method for doing a wait in a static method and without making the whole thing synchronized
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@573814 13f79535-47bb-0310-9956-ffa450edef68
2007-09-08 10:34:54 +00:00
David E. Jones
fb4a0080b3
Fixed bugs in recently refactored FreeMarkerWorker: a Reader was always being created even if the template was cached, also the reader was never closed which means files stayed open until the garbage collector cleaned up these objects which on busy production systems could lead to many thousands of open files
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@573442 13f79535-47bb-0310-9956-ffa450edef68
2007-09-07 04:01:25 +00:00
David E. Jones
5d26a3e817
Finally adding stuff for Sets like the Map and List stuff
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@572841 13f79535-47bb-0310-9956-ffa450edef68
2007-09-04 23:39:48 +00:00
David E. Jones
6d1e9778c8
After more testing it looks like I was wrong about this, changing back to use getWriter instead of getOutputStream for Tomcat
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@570857 13f79535-47bb-0310-9956-ffa450edef68
2007-08-29 16:31:33 +00:00
David E. Jones
c7bfe4beb7
Added little method like the addToDoubleInMap to do addToListInMap
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@569749 13f79535-47bb-0310-9956-ffa450edef68
2007-08-26 01:01:58 +00:00
Jacques Le Roux
e2e25b0599
From Adrian argument, I decided to remove the FtlTransform.java file :
...
<<The FtlTransform.java file duplicates the old code in FreeMarkerWorker.java - therefore anyone wanting to use it can simply use FreeMarkerWorker.java instead.
The drawback to keeping it in the project is that someone may want to use it - which would be a bad thing because it duplicates the mistakes that were made in the old FreeMarkerWorker file, PLUS it keeps its own template cache - which introduces the possibility of having two copies of the same template cached.>>
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@567429 13f79535-47bb-0310-9956-ffa450edef68
2007-08-19 17:04:19 +00:00
Jacques Le Roux
9245703ffc
A patch from Adrian Crum "Improved Time Zone Support, Part 2" ( https://issues.apache.org/jira/browse/OFBIZ-1164 )
...
Please see comments in Jira issue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@564957 13f79535-47bb-0310-9956-ffa450edef68
2007-08-11 18:40:45 +00:00
Jacques Le Roux
4bd9d881b9
A patch from Adrian Crum "FreeMarkerWorker.java flexibility" ( https://issues.apache.org/jira/browse/OFBIZ-273 )
...
Uses a sort of dependency injection
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@564914 13f79535-47bb-0310-9956-ffa450edef68
2007-08-11 12:52:41 +00:00
Jacques Le Roux
49ca64b03d
A patch from Adrian Crum "FreeMarkerWorker class has a bug in its caching logic" ( https://issues.apache.org/jira/browse/OFBIZ-1170 )
...
I applied the NewFreeMarkerWorker.patch. It's commited as CTR, I tested it one week without any problems.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@564530 13f79535-47bb-0310-9956-ffa450edef68
2007-08-10 09:45:09 +00:00
Jacques Le Roux
c6d1b428d2
A sequel from https://issues.apache.org/jira/browse/OFBIZ-1184 : REQUIRED_JDK was 1.4
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@563105 13f79535-47bb-0310-9956-ffa450edef68
2007-08-06 11:06:14 +00:00