Commit Graph
2421 Commits
Author SHA1 Message Date
Adam Heath 2f7ee6b1d3 Move Factory to lang package.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923354 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 17:31:34 +00:00
Adam Heath 6d6205e192 Test the ability of loadContainedConverters to skip thrown exceptions.
This leaves 2 lines unconvered, and 1 branch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923103 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 07:27:33 +00:00
Adam Heath 1e042ce64d In PassThruConverterCreator, only use ObjectType.instanceOf, so that
there are no longer any unconvered branches on that line.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923102 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 07:26:58 +00:00
Adam Heath 84e8e45b16 Turn off verbosity of Converters, and no longer explicitly call
Debug.verboseOn; it's not a fast path that needs to have it protected,
as this code is only called once at startup.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923101 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 07:26:10 +00:00
Adam Heath 572679cabf Remove unused null check against targetClass in registerConverter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923100 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 07:25:25 +00:00
Adam Heath 857d0b81a0 Test that public objects in a class are skipped over, if they aren't a
ConverterLoader.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923099 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 07:24:51 +00:00
Adam Heath 8a614758af Converters is a static helper class, so test for that.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923097 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 07:24:14 +00:00
Adam Heath 9aa9857b95 Remove not-needed NullConverter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923096 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 07:23:35 +00:00
Adam Heath c7af9fddd6 Moved call to future.run to inside the main loop; as a side effect, this
causes us to finally reach full branch coverage.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923095 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 07:22:47 +00:00
Adam Heath f50dfd69d2 Reworked setObject to delay the actual setting until the next getObject
call.  Removes one hard to test branch.  Just a single branch left to
test.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923094 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 07:21:59 +00:00
Adam Heath 5f97749e45 100% line coverage, 2 branches left.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923093 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 07:21:10 +00:00
Adam Heath ab880ae454 Remove unneeded cast.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923092 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 07:20:34 +00:00
Adam Heath 176b409413 Full branch coverage now.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923091 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 07:19:57 +00:00
Adam Heath 89c1bec653 Some major tweeking to get better coverage.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923054 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 04:37:31 +00:00
Adam Heath c807dcea6f 100% coverage during testing now.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923053 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 04:37:01 +00:00
Adam Heath d8553a3cef Add new helper method to make constructing simpler.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923052 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 04:36:22 +00:00
Adam Heath 6466fae298 More coverage on ObjectType.simpleTypeConvert.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923051 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 04:35:44 +00:00
Adam Heath 4577e3afa4 Helper wrapper to protect against objects that have some kind of timestamp
checking.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@922758 13f79535-47bb-0310-9956-ffa450edef68
2010-03-14 03:57:12 +00:00
Adam Heath bef43eedb4 Since getTTL throws ConfigurationException, which is now a
RuntimeException, there's no need to declare it in the throws clause.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@922757 13f79535-47bb-0310-9956-ffa450edef68
2010-03-14 03:55:52 +00:00
Adam Heath 45d2d66c02 ConfigurationException is now a RuntimeException.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@922756 13f79535-47bb-0310-9956-ffa450edef68
2010-03-14 03:55:23 +00:00
Adam Heath 809fdb9e88 Fixed coverage of the test cases.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@922755 13f79535-47bb-0310-9956-ffa450edef68
2010-03-14 03:54:53 +00:00
Jacques Le Roux a7a09a0817 As suggested by Adam and Scott move the encodeQuotes static method (actually renamed encodeDoubleQuotes) from UtilHttp to FreeMarkerWorker
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@921714 13f79535-47bb-0310-9956-ffa450edef68
2010-03-11 07:57:27 +00:00
Jacques Le Roux ca38a526fa Following r921421, here is the right and simplest solution (KISS way).
Simply encoding the tooltip (why I did not think about that before, really sometimes I wonder how my brain is working, I need to stop working for it to begin to work)
There are no needs to encode char like >, but of course < is needed (in he XML file) since else there is a problem in the XML labels file (always the same issue: around vs inside)
So yes, it's only a matter of encoding at the right place, ie before the "around vs inside" issue arises
Good night ;)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@921643 13f79535-47bb-0310-9956-ffa450edef68
2010-03-11 00:20:57 +00:00
Adrian Crum 615c3d83d1 Revert rev 902341 - which seemed to cause problems with the Derby database.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@921455 13f79535-47bb-0310-9956-ffa450edef68
2010-03-10 17:11:18 +00:00
Adam Heath 745fab7188 Make the protected static methods public.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@921089 13f79535-47bb-0310-9956-ffa450edef68
2010-03-09 19:58:36 +00:00
Adam Heath 6122265c29 s/ServiceRegistry/ServiceLoader/
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@921085 13f79535-47bb-0310-9956-ffa450edef68
2010-03-09 19:52:50 +00:00
Scott Gray 4d14316c52 [CVE-2010-0432] Added an OFBiz specific FreeMarker TemplateExceptionHandler, ensures that any stack trace error messages are properly encoded before being dumped to the browser (or anywhere else).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@920370 13f79535-47bb-0310-9956-ffa450edef68
2010-03-08 16:05:14 +00:00
Bruno Busco 458e17a104 The widgets macros are now usable in the FTL files also.
Using these macros in FTL should improve code reuse and avoid having different HTML between widgets based screens and FTL based ones.
This has been developed in OFBIZ-3541.
Thank you Bilgin and Jacques for reviewing and improving the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@920115 13f79535-47bb-0310-9956-ffa450edef68
2010-03-07 21:11:16 +00:00
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