Commit Graph
10472 Commits
Author SHA1 Message Date
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
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
Mathieu Lirzin 0982fa5fdf Improved: Remove unused imports
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859901 13f79535-47bb-0310-9956-ffa450edef68
2019-05-24 23:49:09 +00:00
Nicolas Malin a6c3c08cc0 Fixed: Manage EECAs on delegator.removeBy
(OFBIZ-11040)
When you delete some entities through removeByAnd or removeByCondition, eeca aren't enable and the remove is quite as regard implemented rules.
With
        <eca entity="GoodIndentification" operation="create-store-remove" event="return">
             <action service="indexProductKeywords" mode="sync"/>
        </eca>
And
        delegator.removeByAnd('GoodIdentification', [productId: 'WG-1111'])

The service indexProductKeywords wasn't call for the productId WG-1111

To solve this situation, the idea would be delegator.removeValue for each element to delete when an eeca is present otherwise call the standard helper.removeByCondition.

Thanks to Leila Mekika for raise and fix this issue, Jacques Leroux and Mathieu Lirzin for the review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859887 13f79535-47bb-0310-9956-ffa450edef68
2019-05-24 15:07:30 +00:00
Jacques Le Roux 5a9b057f24 Improved: no functional change
Javadoc was unhappy: 
CustomPermissivePolicy.java:13: error: element not closed: blockquote


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859882 13f79535-47bb-0310-9956-ffa450edef68
2019-05-24 14:16:39 +00:00
Jacques Le Roux 2dadaacac8 Fixed: Services allow arbitrary HTML for parameters with allow-html set to "safe"
(OFBIZ-5254)

This was reopened after discussion at 
https://markmail.org/message/jnaitmwahjcjmdn5

This is a new solution which follows the work done with OFBIZ-6669 and OFBIZ-10187
Roughly said, it uses org.owasp.html.PolicyFactory and org.owasp.html.Sanitizers

Thanks: Christoph Neuroth for report

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859877 13f79535-47bb-0310-9956-ffa450edef68
2019-05-24 13:47:08 +00:00
Jacques Le Roux a0d9fba0d9 Fixed: OWASP sanitizer breaks proper rendering of HTML code
(OFBIZ-10187)

After a discussion with Dennis, I checked and the pattern ONSITE_URL would be 
useless without 

.allowAttributes("background").matching(ONSITE_URL)
.onElements("table")
.allowAttributes("background").matching(ONSITE_URL)
.onElements("td", "th", "tr")

So here they are

Thanks: Dennis Balkir for discussion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859871 13f79535-47bb-0310-9956-ffa450edef68
2019-05-24 13:24:31 +00:00
Jacques Le Roux 69587ffec2 Fixed: Replace request-redirect w/ no redirect-param attribute by
request-redirect-noparam
(OFBIZ-9997)

Reverts all the rest from r1816180, and, after reading carefully the code used 
for "request-redirect" in RequestHandler (and downward), fixes the documentation 
in site-conf.xsd


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859800 13f79535-47bb-0310-9956-ffa450edef68
2019-05-23 16:36:37 +00:00
Jacques Le Roux db43941bf1 Fixed: massPrintOrders service does not work
(OFBIZ-11049)

This problem was similar to what was resolved by r1806237 for OFBIZ-9138.

This fixes it by using the same solution than in r1806237. If the visual theme 
is unknown in the the service  context  get the default theme from 
general.properties using ThemeFactory::resolveTheme.

sendPrintFromScreen, createFileFromScreen, sendBirtMail, getXslFo and 
printReportPdf (in example) were concerned


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859735 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 16:41:04 +00:00
Nicolas Malin c96585018e Fixed: Incorrect findByCount on DynamicView with groupBy and selected fields
(OFBIZ-11041)

When you create a DynamicView with 'group by' agreggate function and you perform a delegator.findCountByCondition() with selected fields, the result is different from the count of each element returned by delegator.findList().

The problem come from when the 'group by' closure is populated with all grouped by fields from on the DV and not only those from selected fields.

Thanks to Leila Mekika to raise and solve this issue.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859438 13f79535-47bb-0310-9956-ffa450edef68
2019-05-17 15:45:07 +00:00
Jacques Le Roux cce437fbdf Improved: no functional changes, only formatting
While working on OFBIZ-5254 after reopening it.

Uses the max width (120) makes things easier to read IMO

I also made a slight non functional change w/ seekSegmentTime in 
checkStringForHtmlStrictNone

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859297 13f79535-47bb-0310-9956-ffa450edef68
2019-05-15 16:18:01 +00:00
Jacques Le Roux 53f89ae595 Improved: no functional change, only formatting
While working on OFBIZ-5254 after reopening it.

Uses the max width (120) makes things easier to read IMO

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859295 13f79535-47bb-0310-9956-ffa450edef68
2019-05-15 15:39:03 +00:00
Mathieu Lirzin 3acf261b7f Fixed: Fix javadoc build for OpenJDK 11
(OFBIZ-10757)

This removes HTML5 deprecated stuff such as ‘<tt>’ elements, and
‘cellpadding’ table attributes which were breaking the ‘:javadoc’
Gradle task when using OpenJDK 11.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859123 13f79535-47bb-0310-9956-ffa450edef68
2019-05-11 20:36:45 +00:00
Mathieu Lirzin a0ac6ae331 Improved: Remove useless null check
(OFBIZ-10054)

Additionally the noisy ‘final’ modifiers on local variables have been
removed because local variables should be final by default and mutable
by exception.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859081 13f79535-47bb-0310-9956-ffa450edef68
2019-05-10 14:13:34 +00:00
Jacques Le Roux a8f3480de4 Fixed: no functional changes
Fixes typos


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859055 13f79535-47bb-0310-9956-ffa450edef68
2019-05-10 05:15:28 +00:00
Jacques Le Roux bea0b0e25f Fixed: OWASP sanitizer breaks proper rendering of HTML code
(OFBIZ-10187)

By default we now use a permissive sanitizer policy

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858980 13f79535-47bb-0310-9956-ffa450edef68
2019-05-09 09:17:08 +00:00