Commit Graph
993 Commits
Author SHA1 Message Date
Adam Heath 9627cbc06c Implement proper non-blocking access.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@918728 13f79535-47bb-0310-9956-ffa450edef68
2010-03-03 22:12:58 +00:00
Adam Heath b80b40b6d3 For internal classes, you don't need to prefix with the containing
class.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@918727 13f79535-47bb-0310-9956-ffa450edef68
2010-03-03 22:12:31 +00:00
Adam Heath 4a52467763 Make all the internal variables private and/or final.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@918726 13f79535-47bb-0310-9956-ffa450edef68
2010-03-03 22:12:03 +00:00
Adam Heath b289b45142 Move the test case for ComparableRange to the correct package.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@918724 13f79535-47bb-0310-9956-ffa450edef68
2010-03-03 22:10:52 +00:00
Adam Heath 503c5f9795 Remove javadoc from protected methods.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@918723 13f79535-47bb-0310-9956-ffa450edef68
2010-03-03 22:10:11 +00:00
Adam Heath b517a45e60 Fix typo in javadoc parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@918722 13f79535-47bb-0310-9956-ffa450edef68
2010-03-03 22:09:36 +00:00
Adam Heath 6b9b1156c3 Set src-dirs correctly.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@918721 13f79535-47bb-0310-9956-ffa450edef68
2010-03-03 22:09:08 +00:00
Adam Heath 2ef7601138 Remove a bunch of very simple classes, instead registering abstract
versions.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917630 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 18:20:38 +00:00
Adam Heath a98cdfb0e8 Add an AbstractStringToNumberConverter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917629 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 18:20:03 +00:00
Adam Heath 50bee334d9 Add AbstractNumberToStringConverter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917627 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 18:16:27 +00:00
Adam Heath feaa07ed30 s/AbstractToNumberConverter/AbstractNumberConverter/
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917626 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 18:15:58 +00:00
Adam Heath 397d41c700 All the Number->Number variants now have generic base classes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917625 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 18:15:24 +00:00
Adam Heath 6afb679a11 Add abstract classes to unify simple object to singleton collections.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917624 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 18:14:19 +00:00
Adam Heath 544927d764 BUG FIX: Actually implement proper simple array testing; the previously
added ArrayObjectToList converter was never actually used.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917623 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 18:12:35 +00:00
Adam Heath 3b07b7950d BUG FIX: Move node test to before the loadClass call.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917377 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 05:07:00 +00:00
Adam Heath cabce4bcad BUG FIX: Move the check that tests whether we are converting to the
passed object to before the loadClass call.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917376 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 05:06:16 +00:00
Adam Heath 6f5e964bd4 BUG FIX: When the target type is Object, return the passed value.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917374 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 05:05:43 +00:00
Adam Heath 6502fed7dc BUG FIX: If the object is a string and it is empty, return null early.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917373 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 05:05:10 +00:00
Adam Heath fa5abfa4ce BUG FIX: Throw exceptions instead of logging errors.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917372 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 03:19:08 +00:00
Adam Heath c037f73f05 BUG FIX: Add support for converting to PlainString, which just calls
toString directly.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917371 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 03:18:20 +00:00
Adam Heath 709959af4a BUG FIX: Add TimeZone and Locale to global class names.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917370 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 03:17:34 +00:00
Adam Heath c6d8f49077 BUG FIX: Forbid SqlDateToSqlTime and SqlTimeToSqlDate conversions.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@917369 13f79535-47bb-0310-9956-ffa450edef68
2010-03-01 03:17:02 +00:00
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