Commit Graph
621 Commits
Author SHA1 Message Date
Anil Patel 722c4c33f0 Now checking for Boolean type in request attributes and adding it to returned Json attributes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@901689 13f79535-47bb-0310-9956-ffa450edef68
2010-01-21 13:03:18 +00:00
Adrian Crum e80cf29e02 Simplified the number converters. Eliminated an unnecessary abstract class, made use of Java's auto-boxing. Non-localized Number to String conversions use the the toString() method - so the result is what you would expect.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@901058 13f79535-47bb-0310-9956-ffa450edef68
2010-01-20 04:36:42 +00:00
Scott Gray b8abee939f Add converters to/from ByteBuffer and byte[]
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@899824 13f79535-47bb-0310-9956-ffa450edef68
2010-01-15 21:43:42 +00:00
Adam Heath b17eb127ec Fix trailing whitespace, and mixed tab/space at the beginning of lines.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@899812 13f79535-47bb-0310-9956-ffa450edef68
2010-01-15 21:00:23 +00:00
Adrian Crum a91a37e6af A less aggressive UtilProperties.java update, suggested by Adam Heath.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@898648 13f79535-47bb-0310-9956-ffa450edef68
2010-01-13 04:41:03 +00:00
Adrian Crum 1d47be2260 First pass at converting UtilProperties.java to Java 6, plus some small code cleanups.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@898338 13f79535-47bb-0310-9956-ffa450edef68
2010-01-12 14:24:36 +00:00
Adam Heath eb0f0bfb16 Fix several generics warnings.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@898090 13f79535-47bb-0310-9956-ffa450edef68
2010-01-11 22:21:12 +00:00
Erwan de Ferrieres 8726524ab1 Creating a calendar event was starting at 12:00 even if selecting a start time before
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@896504 13f79535-47bb-0310-9956-ffa450edef68
2010-01-06 16:20:27 +00:00
Bilgin Ismet Ibryam 6b0a2fe97f Use getLocalName() instead of getNodeName() and getTagName() methods. This change will fix errors in soap call, where elements have namespace prefixes.
I didn't notice any error caused from these changes, but it would be great if someone with more xml knowledge takes a loot at it.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@894359 13f79535-47bb-0310-9956-ffa450edef68
2009-12-29 11:33:39 +00:00
Adam Heath 93cc17b5b0 Remove a bunch of wildcard imports.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@894106 13f79535-47bb-0310-9956-ffa450edef68
2009-12-27 19:54:58 +00:00
Adam Heath 17e8d26105 Fix some javadoc warnings.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@894037 13f79535-47bb-0310-9956-ffa450edef68
2009-12-27 01:01:01 +00:00
Adrian Crum 2b0d1e0c63 Improved converter tests.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@893635 13f79535-47bb-0310-9956-ffa450edef68
2009-12-23 21:39:55 +00:00
Adrian Crum ca49d9bc66 First batch of converter tests.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@893313 13f79535-47bb-0310-9956-ffa450edef68
2009-12-22 20:54:55 +00:00
Adam Heath dae44c3bd4 Some set helper methods.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@893077 13f79535-47bb-0310-9956-ffa450edef68
2009-12-22 06:08:43 +00:00
Adam Heath ad3b379d34 Fix groovy class parsing/caching.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@891070 13f79535-47bb-0310-9956-ffa450edef68
2009-12-15 23:24:02 +00:00
Adam Heath 2abf8fed43 Utility methods for reading strings from streams and readers.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@891068 13f79535-47bb-0310-9956-ffa450edef68
2009-12-15 23:23:15 +00:00
David E. Jones 4e89c158ed Based on idea from Patrick Antivackis in issues #OFBIZ-3257: changed order of sources for parameters Map so that request parameters are the lowest priority instead of second highest; in some general/random testing this seems to work fine, and addresses the issue Patrick brought up as well as preserving flexibility
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@890831 13f79535-47bb-0310-9956-ffa450edef68
2009-12-15 15:37:12 +00:00
Jacques Le Roux 4415d1f33b Typo, but this commit is rather a warning: if you put an underscore in your permission it will be stripped by the lines just below this change, ie
// trim the permissions (remove spaces)
    for (int i = 0; i < this.basePermission.length; i++) {
        this.basePermission[i] = this.basePermission[i].trim();
        if (this.basePermission[i].indexOf('_') != -1) {
            this.basePermission[i] = this.basePermission[i].substring(0, this.basePermission[i].indexOf('_'));
        }
    }
So if you put MY_APP as a permission it will end as MY (I will add a comment at http://cwiki.apache.org/confluence/display/OFBTECH/OFBiz+security)

Also because the comment and the code are not consistent I wonder what those lines are really for...
This is from pre Apache Era. I prefer to not touch...


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@890311 13f79535-47bb-0310-9956-ffa450edef68
2009-12-14 13:30:03 +00:00
Adam Heath 7286ff8d28 Instrumentation with cobertura. It won't actually do anything, tho,
until cobertura-1.9.3.jar is placed into framework/base/lib.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@889839 13f79535-47bb-0310-9956-ffa450edef68
2009-12-11 22:27:18 +00:00
Adam Heath 68e0788392 Generic instrumentation framework. Nothing is configured to use it yet.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@889838 13f79535-47bb-0310-9956-ffa450edef68
2009-12-11 22:26:24 +00:00
Adam Heath de36a4dfb8 Add the beginnings of a tester for GenericMap. Doesn't really verify
anything yet, and is rather stupid, in that it only does printlns.  Not
adding this to the existing test infrastructure, until it is ready.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@889763 13f79535-47bb-0310-9956-ffa450edef68
2009-12-11 18:45:32 +00:00
Adam Heath 2b12434323 Rename putAll(Iterator) to putAllIterator(Iterator).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@889762 13f79535-47bb-0310-9956-ffa450edef68
2009-12-11 18:44:36 +00:00
Adam Heath 52383e1988 Support ConcurrentModificationException for iterators.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@889761 13f79535-47bb-0310-9956-ffa450edef68
2009-12-11 18:43:55 +00:00
Adam Heath 7dcca5e431 Inverted wrapped hasNext/next processing, so that
ConcurrentModificationException support will work, thru an isValid
helper call.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@889759 13f79535-47bb-0310-9956-ffa450edef68
2009-12-11 18:42:33 +00:00
Adam Heath ef08ee7003 Generic test case assertEquals methods, can be used as an extends, or
statically.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@889757 13f79535-47bb-0310-9956-ffa450edef68
2009-12-11 18:40:13 +00:00
Adrian Crum 4585668b7e Changed ObjectType info logging level from warning to verbose.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@889748 13f79535-47bb-0310-9956-ffa450edef68
2009-12-11 18:25:07 +00:00
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 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 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