Mathieu Lirzin
ddbc034d36
Improved: Extract ‘intersects’ predicate in a method
...
(OFBIZ-11099)
The lambda expression was a bit too long, so it is preferable to
extract it in a dedicated method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860956 13f79535-47bb-0310-9956-ffa450edef68
2019-06-10 15:24:14 +00:00
Mathieu Lirzin
266e0d0a87
Improved: Use the ‘Deque’ interface in ‘ContainerLoader’
...
(OFBIZ-11099)
With a deque it is possible to iterate from the end of a list with
‘Deque#descendingIterator’ which is useful when unloading containers.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860954 13f79535-47bb-0310-9956-ffa450edef68
2019-06-10 15:22:10 +00:00
Mathieu Lirzin
8a681cd347
Improved: Add missing ‘static’ modifier for safe public methods
...
(OFBIZ-11098)
In order to make it clear when a method is not depending on the
internal state of an object, it is a good practice to declare it as
static.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860946 13f79535-47bb-0310-9956-ffa450edef68
2019-06-10 14:11:20 +00:00
Mathieu Lirzin
ffe2e7ffdf
Improved: Add missing ‘static’ modifier for private methods
...
(OFBIZ-11098)
In order to make it clear when a method is not depending on the
internal state of an object, it is a good practice to declare it as
static.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860937 13f79535-47bb-0310-9956-ffa450edef68
2019-06-10 12:27:40 +00:00
Jacques Le Roux
08f0b84462
Improved: no functional change, adds missing license headers
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860902 13f79535-47bb-0310-9956-ffa450edef68
2019-06-09 13:08:08 +00:00
Mathieu Lirzin
e2c85737e4
Improved: Add static modifiers in ‘EntityDataLoadContainer’
...
(OFBIZ-11070)
When no reference to ‘this’ is made, it is better to declare methods
as static.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860838 13f79535-47bb-0310-9956-ffa450edef68
2019-06-08 14:59:02 +00:00
Mathieu Lirzin
8b2de5fae2
Improved: Rewrite ‘EntityDataLoadContainer#isDataReadersEnabled’
...
(OFBIZ-11070)
Use a boolean expression instead of a conditional.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860837 13f79535-47bb-0310-9956-ffa450edef68
2019-06-08 14:57:08 +00:00
Mathieu Lirzin
0a465fa748
Improved: Rewrite ‘EntityDataLoadContainer#isPropertySet’
...
(OFBIZ-11070)
Use a boolean expression instead of a conditional.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860836 13f79535-47bb-0310-9956-ffa450edef68
2019-06-08 14:54:38 +00:00
Deepak Dixit
ee60f84b65
Improved: Added Debug error statement for freemarker OFBIZ_DEFAULT_HANDLER, it will be helpful while debugging.
...
(OFBIZ-10817)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860696 13f79535-47bb-0310-9956-ffa450edef68
2019-06-06 05:42:30 +00:00
Nicolas Malin
69d4c767ea
Fixed: Decrypt a field on embedded entity-view failed
...
(OFBIZ-11078)
When you tried to decrypt a field present on embedded entity-view, key use is the view name and not the final entity who contains this field.
You currently have the problem on PartyContactMechDetail where if you want to displaying the ftpPassword for a FtpAddress, the view failed and tried to use ContactMechDetail to decrypt instead of FtpAddress
To solve it, we iterate on the entity contains the field in the view while is an entity-view :
PartyContactMechDetail.ftpPassword
-> ContactMechDetail.ftpPassword
-> FtpAddress.ftpPassword
-> key found FtpAddress
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860365 13f79535-47bb-0310-9956-ffa450edef68
2019-05-29 18:53:37 +00:00
Jacques Le Roux
6447258bf3
Improved: no functional change
...
Adds missing ASL2 licenses
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860259 13f79535-47bb-0310-9956-ffa450edef68
2019-05-28 12:52:17 +00:00
Jacques Le Roux
87fc949af8
Reverted: Refactor EntityDataLoadContainer
...
(OFBIZ-11070)
There is something wrong with Mathieu's changes, reverting all for now
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860113 13f79535-47bb-0310-9956-ffa450edef68
2019-05-27 09:29:28 +00:00
Mathieu Lirzin
07406d341d
Improved: Add static modifiers in ‘EntityDataLoadContainer’
...
(OFBIZ-11070)
When no reference to ‘this’ is made, it is better to declare methods
as static.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860064 13f79535-47bb-0310-9956-ffa450edef68
2019-05-26 12:40:21 +00:00
Mathieu Lirzin
655f19c2fa
Improved: Inline ‘EntityDataLoadContainer#getLoadFiles’
...
(OFBIZ-11070)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860063 13f79535-47bb-0310-9956-ffa450edef68
2019-05-26 12:35:13 +00:00
Mathieu Lirzin
b71cd98911
Improved: Rewrite ‘EntityDataLoadContainer#isDataReadersEnabled’
...
(OFBIZ-11070)
Use a boolean expression instead of a conditional.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860062 13f79535-47bb-0310-9956-ffa450edef68
2019-05-26 12:33:13 +00:00
Mathieu Lirzin
388f4c8b52
Improved: Rewrite ‘EntityDataLoadContainer#isPropertySet’
...
(OFBIZ-11070)
Use a boolean expression instead of a conditional.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860061 13f79535-47bb-0310-9956-ffa450edef68
2019-05-26 12:31:19 +00:00
Jacques Le Roux
28e119027c
Improved: Use Groovy Truth instead of UtilValidate Class in Groovy
...
(OFBIZ-11064)
As we all know, Groovy is a powerful language with great built-in functions.
Groovy Truth[1] is one of them, which is not used properly in our code base.
We have used UtilValidate Class to validate arguments for Empty or NotEmpty,
which can easily be done in groovy with built-in functionality[1].
Current Code: if (UtilValidate.isNotEmpty(locations)) { ... }
Groovy Built-in Code: if (locations) { ... }
[1] - http://groovy-lang.org/semantics.html#Groovy-Truth
We need to careful for some points while we change this:
Like:
maxRetry = 0
if (!maxRetry)
{ // Not set, use a default maxRetry = -1 }
Because groovy evaluates zero to be false, it wouldn't be possible to set
maxRetry to zero. So it's best not to use groovy truth for null-checks on
numbers in some cases.
Thanks: Pawan Verma
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860051 13f79535-47bb-0310-9956-ffa450edef68
2019-05-26 10:36:16 +00:00
Mathieu Lirzin
5ac6be8f19
Improved: Turn ‘TestJSONConverters’ into a unit test class
...
(OFBIZ-11067)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860024 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 21:58:15 +00:00
Mathieu Lirzin
44188945a7
Improved: Turn ‘TestBooleanConverters’ into a unit test class
...
(OFBIZ-11067)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860023 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 21:54:01 +00:00
Mathieu Lirzin
fb8705dbf0
Improved: Turn ‘BaseUnitTests’ into a unit test class
...
(OFBIZ-11067)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860022 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 21:29:31 +00:00
Mathieu Lirzin
c43b99c812
Improved: Turn ‘AssertTests’ into a unit test class
...
(OFBIZ-11067)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860021 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 21:28:23 +00:00
Mathieu Lirzin
c465e734ae
Improved: Turn ‘UtilMiscTests’ into a unit test class
...
(OFBIZ-11067)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860020 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 21:27:30 +00:00
Mathieu Lirzin
e59a460525
Improved: Turn ‘UtilIOTests’ into a unit test class
...
(OFBIZ-11067)
Previously this test was disabled, however since it now seems to work
now we enable it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860019 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 21:24:02 +00:00
Mathieu Lirzin
2d5e81cc50
Improved: Remove empty ‘UtilHttpTests’ class
...
(OFBIZ-11067)
This test class was empty so no need to convert it in a unit test
class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860018 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 21:21:05 +00:00
Mathieu Lirzin
1d2d4ac50a
Improved: Turn ‘UtilCacheTests’ into a unit test class
...
(OFBIZ-11067)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860017 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 21:19:54 +00:00
Mathieu Lirzin
409323020e
Improved: Turn ‘TimeDurationTests’ into a unit test class
...
(OFBIZ-11067)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860016 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 21:15:04 +00:00
Mathieu Lirzin
aa874841ce
Improved: Turn ‘ReferenceCleanerTests’ into a unit test class
...
(OFBIZ-11067)
Keep it disabled since it is failing for obscure reasons.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860015 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 21:13:46 +00:00
Mathieu Lirzin
94c60ee977
Fixed: Remove entry for ‘StringUtilTests’ in “basetests.xml”
...
(OFBIZ-11014)
This XML element should have been removed in r1859937 when turning
this integration test class into a unit test class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860006 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 17:49:57 +00:00
Mathieu Lirzin
9587898bbe
Improved: Turn ‘ObjectTypeTests’ into a unit test class
...
(OFBIZ-11067)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859984 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 14:28:15 +00:00
Mathieu Lirzin
d0a1dde34e
Improved: Turn ‘MiscTests’ into a unit test class
...
(OFBIZ-11067)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859982 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 14:25:28 +00:00
Mathieu Lirzin
36d284097e
Turn ‘IndentingWriterTests’ into a unit test class
...
(OFBIZ-11067)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859979 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 14:23:12 +00:00
Mathieu Lirzin
10a8ad3097
Improved: Turn ‘GenericMapTest’ into a unit test class
...
(OFBIZ-11067)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859978 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 14:20:53 +00:00
Mathieu Lirzin
1103a2a3e1
Improved: Turn ‘DateTimeTests’ into a unit test class
...
(OFBIZ-11067)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859977 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 14:18:19 +00:00
Mathieu Lirzin
2a4a9bad13
Improved: Turn ‘ComparableRangeTests’ into a unit test class
...
(OFBIZ-11067)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859976 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 14:15:40 +00:00
Mathieu Lirzin
0dede26601
Improved: Turn ‘UtilPropertiesTests’ into a unit test class
...
(OFBIZ-11067)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859975 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 14:12:37 +00:00
Jacques Le Roux
402db94e61
Fixed: Duplicate entries in paramWithSuffix
...
(OFBIZ-11056)
when using string-list-suffix attribute for service definition, invoke method
(from associated event handler) will try to parse parameters from both request
variable and rawParameterMap which was also built from request.
So we end up with duplicates in resulting list.
This behaviour seems to be introduced with OFBIZ-5048.
Thanks: Samuel Trégouët for report and fix
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859972 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 14:08:48 +00:00
Jacques Le Roux
c26b16a5ee
Fixed: Services allow arbitrary HTML for parameters with allow-html set to "safe"
...
(OFBIZ-5254)
The testCreateNewRequest was failing due to escaped single quotes in related
data in OrderTypeData.xml:
subject="OFBiz - Your Request is received: '${custRequestName}' #CR${custRequestId}"
This was a peculiar case that could be generalised to all escapable characters.
The general solution is to compare the original value with the filtered value
unescaped in UtilCodec::checkStringForHtmlSafe.
BTW, weirdly enough StringEscapeUtils::escapeHtml4 does not escape single quote.
Another weirdness is the test was passing with plugins data loaded. This is due
to duplicated demo data in scrumTypeData.xml (which is actually not only type
data, as ever the scrum component is a mess, that's not new and always wonder
if we should not get rid of it!)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859968 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 13:25:34 +00:00
Mathieu Lirzin
79edce69f8
Improved: ‘ServiceDispatcher’ is not meant to be extended
...
(OFBIZ-11032)
This makes the ‘ServiceDispatcher’ class final and replaces the
‘protected’ modifier with ‘private’ for all the fields and methods in
this class.
Thanks Girish Vasmatkar, Jacques Le Roux and Suraj Khurana for the
review.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859938 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 10:01:14 +00:00
Mathieu Lirzin
410a67a3dc
Improved: Turn ‘StringUtilTests’ into a unit test class
...
(OFBIZ-11014)
Since there is no dependency on the delegator and dispatcher for those
tests, it is better to run them as unit tests instead of integration
tests.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859937 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 09:38:42 +00:00
Mathieu Lirzin
008fd8ded4
Improved: Remove unused ‘StringUtil#appendTo’ methods
...
(OFBIZ-11014)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859934 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 09:28:36 +00:00
Mathieu Lirzin
047340f8a5
Improved: Remove unused ‘StringUtil#collapseCharacter’
...
(OFBIZ-11014)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859932 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 09:27:09 +00:00
Mathieu Lirzin
b601acc979
Improved: Remove unused ‘StringUtil#collapseSpaces’ method
...
(OFBIZ-11014)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859930 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 09:25:41 +00:00
Mathieu Lirzin
87a02f4ca7
Improved: Remove unused ‘StringUtil#collapseNewlines’ method
...
(OFBIZ-11014)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859929 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 09:24:37 +00:00
Mathieu Lirzin
b24f702c77
Improved: Remove unused ‘StringUtil#removeNumeric’ method
...
(OFBIZ-11014)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859928 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 09:22:58 +00:00
Mathieu Lirzin
ad9fc62be5
Improved: Remove unused ‘StringUtil#convertChar’ method
...
(OFBIZ-11014)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859927 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 09:21:53 +00:00
Mathieu Lirzin
c79b0633ab
Improved: Remove unused ‘StringUtil#mapToStr’ method
...
(OFBIZ-11014)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859926 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 09:21:06 +00:00
Mathieu Lirzin
fd7eab1d30
Improved: Remove unused ‘StringUtil#strToMap’ overload
...
(OFBIZ-11014)
Make the other overload which is only used internally private.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859925 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 09:18:55 +00:00
Mathieu Lirzin
b97461e47a
Improved: Inline ‘StringUtil#quoteStrList’ method
...
(OFBIZ-11014)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859924 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 09:17:12 +00:00
Mathieu Lirzin
7bd53374ed
Improved: Remove unused ‘StringUtil#split’ overload
...
(OFBIZ-11014)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859923 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 09:15:38 +00:00
Mathieu Lirzin
d7aab2ff73
Improved: Remove unused ‘StringUtil#append’ method
...
(OFBIZ-11014)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859922 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 09:13:41 +00:00