Commit Graph
2421 Commits
Author SHA1 Message Date
Adam Heath 9859ec4da9 BUG FIX: Add DurationToFloat and Double converters.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917368 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 03:15:36 +00:00
Adam Heath 906c72b923 BUG FIX: in StringToDuration converter, handle the case where there is
no : in the string, and it's just a plain number.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917367 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 03:14:59 +00:00
Adam Heath 6a0b1cf6ae BUG FIX: Add several missing Foo->List and Foo->Set converters.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917366 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 03:14:22 +00:00
Adam Heath a5cd97c2c7 BUG FIX: Add array->List converter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917365 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 03:13:37 +00:00
Adam Heath aa76d1bc8f BUG FIX: In integer/long to BigDecimal, don't convert the number to a
double first.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917364 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 03:12:53 +00:00
Adam Heath 71e4eb5ffd BUG FIX: Trim all space before converting a string to a Boolean.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917363 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 03:12:11 +00:00
Adam Heath a4b4761af9 ObjectType tests.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917362 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 03:11:37 +00:00
Adam Heath caa4107488 Remove some debug prints.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917361 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 03:10:51 +00:00
Adam Heath ddd8af68ba Need to check whether the wanted object is a Set before checking if it
is a Collection.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917360 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 03:10:12 +00:00
Adrian Crum 24922db654 Created a new Java package - org.ofbiz.base.lang - which is intended to be used as a home for basic Java types. Moved some basic Java type classes into the new package.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@916987 13f79535-47bb-0310-9956-ffa450edef68
2010-02-27 16:48:32 +00:00
Adam Heath 6d55228f88 Improve generics markup, T extends Comparable<T>, which means no more
casting as to be done.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@915686 13f79535-47bb-0310-9956-ffa450edef68
2010-02-24 05:43:41 +00:00
Adam Heath f76ee3cb6e Remove trailing whitespace on one line.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@915685 13f79535-47bb-0310-9956-ffa450edef68
2010-02-24 05:43:12 +00:00
Adam Heath fa7cf09752 100% coverage on ComparableRange.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@915684 13f79535-47bb-0310-9956-ffa450edef68
2010-02-24 05:42:47 +00:00
Adam Heath d6195f5508 Use assertEquals for equality tests.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@915683 13f79535-47bb-0310-9956-ffa450edef68
2010-02-24 05:42:19 +00:00
Adam Heath a6cf22123c Move ComparableRange tests to a separate class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@915682 13f79535-47bb-0310-9956-ffa450edef68
2010-02-24 05:41:49 +00:00
Adam Heath 2ba7ff30f3 Remove unused imports.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@915681 13f79535-47bb-0310-9956-ffa450edef68
2010-02-24 05:41:12 +00:00
Adam Heath 93abf2ade9 Remove dead code; FMA has 100% coverage now.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@915396 13f79535-47bb-0310-9956-ffa450edef68
2010-02-23 15:45:16 +00:00
Adam Heath b44941885d Reworked cache access, it's not important to prevent a multiple
instances from being created.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@915395 13f79535-47bb-0310-9956-ffa450edef68
2010-02-23 15:44:46 +00:00
Adam Heath ab692aacc5 Use UtilObject.equalsHelper for null-safe comparison.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@915394 13f79535-47bb-0310-9956-ffa450edef68
2010-02-23 15:44:19 +00:00
Adam Heath 6a01432cb0 A bunch more FMA tests; almost full coverage.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@915393 13f79535-47bb-0310-9956-ffa450edef68
2010-02-23 15:43:49 +00:00
Adam Heath 7b02bca620 Create an fmaTest helper method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@915392 13f79535-47bb-0310-9956-ffa450edef68
2010-02-23 15:43:17 +00:00
Adam Heath 4edd49bd27 Use assertEquals instead of assertTrue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@915391 13f79535-47bb-0310-9956-ffa450edef68
2010-02-23 15:42:47 +00:00
Adam Heath 052c48555f Move FMA tests to a separate file.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@915390 13f79535-47bb-0310-9956-ffa450edef68
2010-02-23 15:42:17 +00:00
Adam Heath fed4b4fa4f Some methods for verifying two objects for inequality.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@915389 13f79535-47bb-0310-9956-ffa450edef68
2010-02-23 15:41:40 +00:00
Adam Heath 90698c511a Removed concurrent backport, as it is only useful when running on java
1.5, and ofbiz requires 1.6 now.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@915167 13f79535-47bb-0310-9956-ffa450edef68
2010-02-23 03:51:02 +00:00
Adam Heath 38e3b6c5cc Tests cases for expand feature. This finally brings us back to 100%
coverage on FSE.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912628 13f79535-47bb-0310-9956-ffa450edef68
2010-02-22 15:41:10 +00:00
Adam Heath f94403991e Add expand() variants, that don't cast the result to a string, instead
just returning the raw value directly.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912625 13f79535-47bb-0310-9956-ffa450edef68
2010-02-22 15:40:16 +00:00
Adam Heath 6aa322189a Use an internal key class, which shares the same character array, as the
key in the cache.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912624 13f79535-47bb-0310-9956-ffa450edef68
2010-02-22 15:39:40 +00:00
Adam Heath b262ef487e CurrElem no longer creates a new string for nested expression
evaluation.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912623 13f79535-47bb-0310-9956-ffa450edef68
2010-02-22 15:39:13 +00:00
Adam Heath 3197175d18 Add testing on CurrElem.isEmpty.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912622 13f79535-47bb-0310-9956-ffa450edef68
2010-02-22 15:38:44 +00:00
Adam Heath ace8638618 Memory reduction on const elements; this was done by making the common
path, the case where you have a plain string that needs to be converted
to FSE, just contain a single char array; this is how it used to be.  In
other cases, constant strings will still share the array of chars with
other nested instances.

This commit does not have 100% coverage.  That will be fixed shortly.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912621 13f79535-47bb-0310-9956-ffa450edef68
2010-02-22 15:38:07 +00:00
Adam Heath ff54da1f0e Fix several spacing issues, no other changes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912619 13f79535-47bb-0310-9956-ffa450edef68
2010-02-22 15:37:38 +00:00
Adam Heath e701384495 Add @Override annotation on several methods.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912618 13f79535-47bb-0310-9956-ffa450edef68
2010-02-22 15:37:11 +00:00
Adam Heath 0a1109c76b Make all the exact instance append methods protected, just like the
method they are supposed to implement.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912617 13f79535-47bb-0310-9956-ffa450edef68
2010-02-22 15:36:41 +00:00
Adam Heath ca07e2f00e Change type of compare object to String.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912616 13f79535-47bb-0310-9956-ffa450edef68
2010-02-22 15:36:07 +00:00
Bilgin Ismet Ibryam 0d9386bb26 Changed UtilDateTime.getDayEnd method to set 0 nanoseconds instead of 999999999. This change is needed for compatibility with MSSQL datetime field which has accuracy of 3 milliseconds.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912509 13f79535-47bb-0310-9956-ffa450edef68
2010-02-22 08:36:21 +00:00
Adam Heath 0a0abee244 Remove dead code. At this point, FSE has full test coverage.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912286 13f79535-47bb-0310-9956-ffa450edef68
2010-02-21 01:34:47 +00:00
Adam Heath 1ff7fd79c0 toString now calls getOriginal.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912285 13f79535-47bb-0310-9956-ffa450edef68
2010-02-21 01:34:17 +00:00
Adam Heath fb997ed8e9 If there is no ${, then don't create a list just to add a single item to
it.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912284 13f79535-47bb-0310-9956-ffa450edef68
2010-02-21 01:33:44 +00:00
Adam Heath e2712b8a9e BUG FIX: Fix getOriginal and toString, to return the unparsed version.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912283 13f79535-47bb-0310-9956-ffa450edef68
2010-02-21 01:33:12 +00:00
Adam Heath 15876ae52d Add variant of getInstance that allows the caching to be skipped.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912282 13f79535-47bb-0310-9956-ffa450edef68
2010-02-21 01:32:39 +00:00
Adam Heath 34d06a62c1 BUG FIX: Fix parsing of currency when there is no variable, and no
trailing ).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912281 13f79535-47bb-0310-9956-ffa450edef68
2010-02-21 01:32:00 +00:00
Adam Heath cadd966d80 BUG FIX: Fix parsing of currency, by using the correct subExpression,
instead of the entire parent expression.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912280 13f79535-47bb-0310-9956-ffa450edef68
2010-02-21 01:31:30 +00:00
Adam Heath 60765d55f4 Lots and lots of tests for FSE; not 100% coverage, there are some bugs
that need to be fixed.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912279 13f79535-47bb-0310-9956-ffa450edef68
2010-02-21 01:30:59 +00:00
Adam Heath 9a104c6b8d BUG FIX: During static expansion, if the context was null, then the
passed expression would be returned.  This is not what would occur if
you called getInstance(null), as that always returns an FSE that expands
to "".  So, fix static expansion to return "" if the expression is null.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912278 13f79535-47bb-0310-9956-ffa450edef68
2010-02-21 01:30:27 +00:00
Adam Heath 2f952125f2 Move the testMap assignments to the beginning of the method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912277 13f79535-47bb-0310-9956-ffa450edef68
2010-02-21 01:29:57 +00:00
Adam Heath ada3f15e23 Extend fseTest to check isEmpty.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912276 13f79535-47bb-0310-9956-ffa450edef68
2010-02-21 01:29:29 +00:00
Adam Heath a06cf78184 Create an fseTest helper method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912275 13f79535-47bb-0310-9956-ffa450edef68
2010-02-21 01:29:02 +00:00
Adam Heath edf6b0952a Remove local compare object.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912274 13f79535-47bb-0310-9956-ffa450edef68
2010-02-21 01:28:27 +00:00
Adam Heath 0f4bed043d Switch assertTrue calls to assertEquals.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@912273 13f79535-47bb-0310-9956-ffa450edef68
2010-02-21 01:28:00 +00:00