Commit Graph
2421 Commits
Author SHA1 Message Date
Jacques Le Roux 908852b731 Remove some useless types, Number covers: BigDecimal, BigInteger, Byte, Double, Float, Integer, Long, Short
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@889319 13f79535-47bb-0310-9956-ffa450edef68
2009-12-10 16:41:13 +00:00
Scott Gray 84445caafe Fix typo
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@889043 13f79535-47bb-0310-9956-ffa450edef68
2009-12-10 01:02:37 +00:00
Scott Gray a56b0d4ea2 Added two new methods to UtilHttp to assist in temporarily storing and retreiving request parameters to/from the session.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@889038 13f79535-47bb-0310-9956-ffa450edef68
2009-12-10 00:52:37 +00:00
Jacques Le Roux 22741bbb34 I found Long to appear too much. While at it I add all primtives wrappers
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@889015 13f79535-47bb-0310-9956-ffa450edef68
2009-12-09 23:15:19 +00:00
Jacques Le Roux 1423f948ee A patch from Erwan de FERRIERES " Update and correction for the visual HTML editor" (https://issues.apache.org/jira/browse/OFBIZ-3317) - OFBIZ-3317
The visual editor is using this line to fix a minimum height for the textarea box.
if (!o(idTa).rows < 5) o(idTa).rows='15';//IE won't use % from style
No matter the size we give it, it stays at 15. So I commented the line in the .js file. While I was at it, I updated whizzywig.js to the last version (55i ->59) and put the new toolbar icons system

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@889014 13f79535-47bb-0310-9956-ffa450edef68
2009-12-09 23:07:02 +00:00
Adam Heath 48a7d8470e Add a target for per-component quick testing. Can only deal with tests
that can run standalone.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@888851 13f79535-47bb-0310-9956-ffa450edef68
2009-12-09 16:05:33 +00:00
Adam Heath 1c2d454f0d Bother, back out GenericMap change to this; more extensive testing
concurrent modification type bugs with the keySet/entrySet/values
collections.  I saw an exception in AbstractEntityConditionCache, so
I'll back this out until I have a chance to fix it properly.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@885343 13f79535-47bb-0310-9956-ffa450edef68
2009-11-30 07:36:56 +00:00
Adam Heath 9b03b443db UtilCache is now a map. keySet, entrySet, and values iterators won't
reflect items added/removed.  However, most membership tests directly
access the underlying cache anyways, so this isn't a big deal.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@885275 13f79535-47bb-0310-9956-ffa450edef68
2009-11-29 21:26:37 +00:00
Adam Heath 548b074859 Make cacheLineTable private and final.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@885274 13f79535-47bb-0310-9956-ffa450edef68
2009-11-29 21:25:17 +00:00
Adam Heath 0a53bebe52 Don't return null in values(), but instead an empty collection.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@885272 13f79535-47bb-0310-9956-ffa450edef68
2009-11-29 21:24:16 +00:00
Adam Heath 5baa6186e1 Switch UtilCache.values() to return a Collection instead of a List.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@885270 13f79535-47bb-0310-9956-ffa450edef68
2009-11-29 21:23:38 +00:00
Adam Heath 1a1cc17e5f Add isEmpty implementation.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@885269 13f79535-47bb-0310-9956-ffa450edef68
2009-11-29 21:22:50 +00:00
Adam Heath 2dec3e0f54 Change return type of size() to int; CacheLineTable.size() already had
an int return, and this change moves this closer to the Map interface.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@885188 13f79535-47bb-0310-9956-ffa450edef68
2009-11-29 03:35:07 +00:00
Jacques Le Roux 035361f4b6 Oops, this file should not have been changed in r885103
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@885117 13f79535-47bb-0310-9956-ffa450edef68
2009-11-28 17:34:22 +00:00
Jacques Le Roux e07ab48fb4 Some cleaning related to is(Not)Empty
* remove duplicate ()
* remove casts no longer needed

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@885103 13f79535-47bb-0310-9956-ffa450edef68
2009-11-28 15:46:52 +00:00
Jacques Le Roux 569a4afeea Some cleaning related to isEmpty
* remove duplicate ()
* remove casts no longer needed

I'm doing these last tasks around isEmpty and isNotEmpty mostly to be sure that nothing has slipped in. Despite I have been very careful, I prefer double check.

+ one typo in ofbizSelenium help (not sure this file is used yet though, seems to be missing some parts which are commented out, for now I guess)



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@885093 13f79535-47bb-0310-9956-ffa450edef68
2009-11-28 14:08:16 +00:00
Jacques Le Roux 2777b83223 Fix r885091 where isNotEmpty has been used by error instead of isEmpty
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@885092 13f79535-47bb-0310-9956-ffa450edef68
2009-11-28 13:59:45 +00:00
Jacques Le Roux 5d4b9b5982 More uses of isEmpty(expr) instead of (expr == null) || (expr.size() == 0
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@885091 13f79535-47bb-0310-9956-ffa450edef68
2009-11-28 13:31:52 +00:00
Adam Heath d68d9fb287 None of the stats values were protected with any kind of locking. The
The jvm doesn't guarantee anything about ++ operations; they are *not*
single commands.  This is even more of a problem with 64 bit longs on a
32 bit jvm, where even a read or a write to/from a long may be multiple
commands.  It is entirely possible that a write to a long might be
partially read by another thread.

The fix is either to protected all the stats with a synchronized block,
either a single one, or one per stat, or to use the new java 1.5 atomic
variables.  The latter is much better, because most of the time no one
is reading the stats, so there is hardly ever any contention.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@884984 13f79535-47bb-0310-9956-ffa450edef68
2009-11-27 20:26:06 +00:00
Jacques Le Roux fbae8a234f A patch from Patrick Antivackis "In owasp-esapi-java, htmlCodec.decode is broken for all entities where entity.substr(0, x) exists ." (https://issues.apache.org/jira/browse/OFBIZ-3135) - OFBIZ-3135
I checked the diff Patrick provided against http://code.google.com/p/owasp-esapi-java/source/detail?r=755 and found no differences (except test classes no present of course)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@884781 13f79535-47bb-0310-9956-ffa450edef68
2009-11-27 08:26:54 +00:00
Jacques Le Roux e26e66c8c3 Oops, I forgot to commit this file in r884545
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@884598 13f79535-47bb-0310-9956-ffa450edef68
2009-11-26 15:42:46 +00:00
Jacques Le Roux 2c51efbc09 Better version of isEmpty() with comments from Scott and Adam on dev ML.
I used one line, please feel free to comment if needed

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@884545 13f79535-47bb-0310-9956-ffa450edef68
2009-11-26 13:09:40 +00:00
Adam Heath cd446f9c3c Fix getOrCreateUtilCache, so that it doesn't always create new caches; mea culpa.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@884262 13f79535-47bb-0310-9956-ffa450edef68
2009-11-25 20:47:51 +00:00
Adam Heath 683479438b size() needs to be synchronized as well.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@884239 13f79535-47bb-0310-9956-ffa450edef68
2009-11-25 19:47:31 +00:00
Adam Heath 8ad14aae64 Remove synchronization for listeners, switching to CopyOnWriteArraySet.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@884238 13f79535-47bb-0310-9956-ffa450edef68
2009-11-25 19:46:49 +00:00
Adam Heath 126a045cda Remove all remaining synchronized protection against utilCacheTable.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@884237 13f79535-47bb-0310-9956-ffa450edef68
2009-11-25 19:46:05 +00:00
Jacques Le Roux 70d7a15dfb Partially fix an issue I discussed with Akash on dev ML on how to format decimals in prices
* Mostly parameterize UtilFormatOut.formatPrice() from general.properties
* I removed unused currency.decimal.format calls in CheckOutEvents class
* Also removed unused priceNumberFormat in UtilFormatOut class

Still have to fix 11 harcoded  "##0.00" in ftl files using ofbizCurrency 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@884023 13f79535-47bb-0310-9956-ffa450edef68
2009-11-25 10:43:09 +00:00
Adrian Crum 07f3abc276 Eliminated unnecessary casts.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883827 13f79535-47bb-0310-9956-ffa450edef68
2009-11-24 19:26:20 +00:00
Adrian Crum 036cc7b2c4 Converter framework bug fixes. This commit fixes the out of memory errors the demo servers have been having lately.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883807 13f79535-47bb-0310-9956-ffa450edef68
2009-11-24 18:37:09 +00:00
Jacques Le Roux 8620399660 Complete r883634 : allows to check isEmpty() on a CharSequence
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883647 13f79535-47bb-0310-9956-ffa450edef68
2009-11-24 10:29:30 +00:00
Jacques Le Roux e25f58f02d Scott detected that UtilValidate.is(Not)Empty did not exist for CharSequence and reverted changes I did in EntitySaxReader.java
This commit adds UtilValidate.is(Not)Empty for CharSequence; and uses it in EntitySaxReader.java and everywhere else it might still be used (because of my changes)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883634 13f79535-47bb-0310-9956-ffa450edef68
2009-11-24 09:24:32 +00:00
Adrian Crum 0206592d18 JavaDoc updates in the conversion framework. No functional changes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883589 13f79535-47bb-0310-9956-ffa450edef68
2009-11-24 05:35:18 +00:00
Jacques Le Roux c72b29cb1f Use UtilValidate.isNotEmpty methods instead of (obj != null) || (obj.length > 0) and (obj != null) || (obj.size > 0)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883549 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 23:41:34 +00:00
Adrian Crum df86f46af2 Added Blob<->byte[] converters.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883529 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 22:49:06 +00:00
Jacques Le Roux 5518e9baf8 Use UtilValidate.isEmpty methods instead of (obj == null) || (obj.size == 0)
Complete r883492

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883516 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 22:02:05 +00:00
Jacques Le Roux e839974fe7 Use UtilValidate.isEmpty methods instead of (obj == null) || (obj.length == 0)
Complete r883507


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883508 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 21:48:18 +00:00
Jacques Le Roux 4e0d303e06 Use UtilValidate.isEmpty methods instead of (obj == null) || (obj.length == 0)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883507 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 21:42:18 +00:00
Adam Heath 1e2d73707f Switch to ConcurrentHashMap for utilCacheTable.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883230 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 03:07:01 +00:00
Adam Heath 10bc1da16b Remove all but one constructor.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883229 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 03:06:21 +00:00
Adam Heath c4a0d6d66d Make utilCacheTable private.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883228 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 03:05:30 +00:00
Adam Heath e4718ddb62 Add a helper method, getUtilCacheTableKeySet, and use that in
FindUtilCache.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883227 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 03:04:50 +00:00
Adam Heath 6e0fcf060a No longer access utilCacheTable from AbstractCache; this nescessatited
creating a getOrCreateUtilCache helper method.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883225 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 03:03:20 +00:00
Adam Heath 760632627c Add another createUtilCache variant that allows for extra properties to
be looked upped for setting parameters.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883223 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 03:01:37 +00:00
Adam Heath 8c800494de Fix defaultIndices manipulation, by switching to ConcurrentHashMap; this
has a good side-effect of fixing the total lack of synchronization on
the previous version.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883222 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 03:00:49 +00:00
Adam Heath b625a1ff4d Make defaultIndex calculation field and method private and static.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883221 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 03:00:04 +00:00
Adam Heath 0a1ab8a989 Move utilCacheTable.put out of the constructors.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883220 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 02:59:22 +00:00
Adam Heath f691ed6312 Make utilCacheTable final.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883219 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 02:58:36 +00:00
Adam Heath b6788006fb Make all constructors private(removing deprecation while doing so), and
then make the name property private/final.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883218 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 02:57:47 +00:00
Adam Heath 820d11eb97 Deprecate UtilCache constructors, and add a create helper function.
This is the first step to making utilCacheTable concurrent, and
non-blocking.  To do so, the constructor has to have no side-effects.
This means it can't modify utilCacheTable itself; this will be moved to
the helper function created above.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883217 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 02:56:28 +00:00
Adam Heath 60e0905b7f Fix generics in getUtilCacheTableValuesImage.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883216 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 02:52:29 +00:00