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
Suraj Khurana
5dfb8a24cd
Improved: Unit test case for service - CreateReturnItemShipment.
...
(OFBIZ-8859)
Thanks Avnindra Sharma for reporting the issue and Yogesh Naroliya for providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860005 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 16:45:44 +00:00
Suraj Khurana
6ad72737b7
Improved: Unit test case for service - CheckCreateProductRequirementForFacility.
...
(OFBIZ-8937)
Thanks Avnindra Sharma for reporting the issue and Anushi Gupta for providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860004 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 16:35:56 +00:00
Suraj Khurana
52d8436640
Improved: Used more declarative style for the context map, preferring map literals over imperative map.
...
(OFBIZ-8853)
Thanks Mathieu Lirzin for your suggestion.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860003 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 16:28:28 +00:00
Suraj Khurana
e51b05e01d
Improved: Unit test case for service - CheckPaymentAmountForRefund.
...
(OFBIZ-8852)
Thanks Avnindra Sharma for reporting the issue and Yogesh Naroliya for providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860000 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 15:50:49 +00:00
Suraj Khurana
0e3ebf957f
Improved: Unit test case for service - CheckReturnComplete.
...
(OFBIZ-8853)
Thanks Avnindra Sharma for reporting the issue and Yogesh Naroliya for providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859999 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 15:48:08 +00:00
Suraj Khurana
fa95a9403c
Improved: Unit test case for service - CreateReturnAndItemOrAdjustment.
...
(OFBIZ-8858)
Thanks Avnindra Sharma for reporting the issue and Yogesh Naroliya for providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859994 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 15:38:44 +00:00
Suraj Khurana
b8940f0e1d
Improved: Unit test case for service - quickReturnOrder.
...
(OFBIZ-8809)
Thanks Avnindra Sharma for reporting the issue and Yogesh Naroliya for providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859992 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 15:34:59 +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
Jacques Le Roux
6580e071be
Fixed: Runtime error exceptions at Leads page
...
(OFBIZ-11059)
Step to recreate issue -
Login to https://demo-trunk.ofbiz.apache.org/ordermgr/control/main
Application > SFA
SFA > Lead Manager
Leads > Click on All Leads button
Application throw Runtime error exception in My Leads section.
Thanks: Sanjay Yadav for report, Kumar Rahul for the fix and Pierre Smits
for help on Jira issue
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859981 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 14:24:30 +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
Swapnil Mane
b871eda45f
Fixed: Error on deleting the survey associated with the task
...
(OFBIZ-7594)
The following error is generated on deleting the survey associated with the task.
Error calling event: org.apache.ofbiz.webapp.event.EventHandlerException: Problems getting the service model (Cannot locate service by name (deleteWorkEffortSurveyAppl))
On exploration I found, In the refactoring work done under OFBIZ-8408, the deleteWorkEffortSurveyAppl service was removed.
Added the deleteWorkEffortSurveyAppl service, previously it was in written in the simple engine, converted it to entity-auto.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859931 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 09:25:56 +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
Mathieu Lirzin
d886fd1b1b
Improved: Rewrite ‘StringUtil#join’ method
...
(OFBIZ-11014)
Use streams instead of low-level string builder.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859921 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 09:12:05 +00:00
Mathieu Lirzin
ab2fcbcb4a
Improved: Remove useless ‘StringUtil#join’ overload
...
(OFBIZ-11014)
‘List’ extends ‘Collection’ so there is no need to overload
‘StringUtil#join(Collection,String)’ with ‘StringUtil#join(List,String)’.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859920 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 09:10:12 +00:00
Suraj Khurana
90e70dd2f2
Fixed: Enable entity timestamp fields.
...
(OFBIZ-10959)
While working on a Production environment, it is found that for some reason entity timestamp fields are disabled at Search Results screen in Trunk and the previous release branch.
Thanks Pawan Verma for reporting the issue and providing the patch, Jacques, Gil, Mathieu for reviewing it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859915 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 08:26:33 +00:00
Suraj Khurana
56d7903400
Improved: ContactMechPurposeType entity should be extended with generic type entity fields.
...
(OFBIZ-11008)
Thanks Jacques for reviewing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859913 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 06:40:54 +00:00