Commit Graph
27737 Commits
Author SHA1 Message Date
Deepak Dixit c449de5f17 Test Commit 2019-11-02 00:40:53 +05:30
Mathieu Lirzin 298d6cd953 Improved: Update checkstyle max error count
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869186 13f79535-47bb-0310-9956-ffa450edef68
2019-10-30 15:53:19 +00:00
Mathieu Lirzin 7d9080702d Improved: Turn ‘DependsOnInfo’ into a String
(OFBIZ-11264)

`depends-on` XML tag doesn't have any `loader` or `location` attribute so
DependsOnInfo does not need to extend ResourceInfo.

When removing the class derivation, DependsOnInfo now becomes a simple box
containing a String attribute. In order to make the manipulation of dependency
information simpler, the attribute is now inlined as a simple String value.

Thanks: Samuel Trégouët for your contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869185 13f79535-47bb-0310-9956-ffa450edef68
2019-10-30 15:47:58 +00:00
Mathieu Lirzin e5592a9bf4 Improved: Add ‘ComponentConfig#toString’ to ease debugging
(OFBIZ-11264)

Thanks: Samuel Trégouët for your contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869184 13f79535-47bb-0310-9956-ffa450edef68
2019-10-30 15:42:59 +00:00
Mathieu Lirzin 5a8e2dcf3c Improved: Rewrite ‘ComponentContainer#loadComponentsInDirectory’
(OFBIZ-11264)

Use a more declarative style with the stream API.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869183 13f79535-47bb-0310-9956-ffa450edef68
2019-10-30 15:41:29 +00:00
Mathieu Lirzin aeebf807b8 Improved: Delay the construction of component classpaths
(OFBIZ-11264)

The list of component classpath elements was constructed iteratively
while loading components. This list was additionally used to check if
a component was actually loaded.  This implementation was leading to
hard to understand code that has been replaced by a more appropriate
‘LinkedHashSet’ object.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869182 13f79535-47bb-0310-9956-ffa450edef68
2019-10-30 15:38:08 +00:00
Mathieu Lirzin 7093974aa7 Improved: Remove unnecessary ‘throws’ declarations
(OFBIZ-11264)

Some declared and/or documented exceptions that were not actually
thrown.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869181 13f79535-47bb-0310-9956-ffa450edef68
2019-10-30 15:34:30 +00:00
Mathieu Lirzin c9788a0b48 Improved: Import ‘ComponentDef’ and ‘DependsOnInfo’ inner-classes
(OFBIZ-11264)

This allows to use shorter name when using an variable or parameter of
those types.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869180 13f79535-47bb-0310-9956-ffa450edef68
2019-10-30 15:33:13 +00:00
Jacques Le Roux 34d30421dc Fixed: SOAPService does not work
(OFBIZ-11259)

This was broken by r1839451 committed at the bottom of OFBIZ-10438
A simple fix is to allow "webtools/control/SOAPService/serviceName?WSDL" scheme. 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869155 13f79535-47bb-0310-9956-ffa450edef68
2019-10-30 09:41:14 +00:00
Mathieu Lirzin 9d59f98bc6 Improved: Upgrade Groovy 2.4.16 → 2.5.8
(OFBIZ-11268)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869136 13f79535-47bb-0310-9956-ffa450edef68
2019-10-29 23:59:39 +00:00
Jacques Le Roux bd37837314 Adds a specific TortoiseSVN commit log header
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869100 13f79535-47bb-0310-9956-ffa450edef68
2019-10-29 09:14:38 +00:00
Mathieu Lirzin bc2747dd67 Fixed: Fix javadoc build
(OFBIZ-11007)

This fixes the javadoc errors introduced in revision 1868963.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869039 13f79535-47bb-0310-9956-ffa450edef68
2019-10-27 15:29:10 +00:00
Mathieu Lirzin 59efa181d2 Improved: Lint unit tests
This makes no behavioral changes, only coding style fixes.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869037 13f79535-47bb-0310-9956-ffa450edef68
2019-10-27 12:51:08 +00:00
Mathieu Lirzin d5e09638ba Improved: Merge ‘UtilObjectUnitTest’ into ‘UtilObjectTests’
(OFBIZ-11067)

Those classes were testing the same class.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869023 13f79535-47bb-0310-9956-ffa450edef68
2019-10-26 21:47:46 +00:00
Mathieu Lirzin e5933c677b Improved: Turn ‘UtilObjectTests’ into a unit test class
(OFBIZ-11067)

Adapt ‘UtilObjectUnitTest’ test class to avoid side effects when
testing allowed serialization classes.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869022 13f79535-47bb-0310-9956-ffa450edef68
2019-10-26 21:46:01 +00:00
Mathieu Lirzin af2c4b4d78 Improved: Define specific ‘maxErrors’ for main/test source sets.
(OFBIZ-11262)

Previously a common maximum “checkstyle” error count was provided for
the main/test source sets.  This means that there was no effective
detection of newly introduced coding style errors in tests.  We are
now defining separate error counts to avoid new tests to introduce
such errors.

Thanks: Gil Portenseigne for identifying this limitation.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869010 13f79535-47bb-0310-9956-ffa450edef68
2019-10-26 16:24:22 +00:00
Mathieu Lirzin 43c098c648 Improved: Use utilitary ‘OFBizTestCase#getLogin’ in ‘ServicePermissionTests’
(OFBIZ-11262)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869009 13f79535-47bb-0310-9956-ffa450edef68
2019-10-26 16:22:07 +00:00
Mathieu Lirzin 129ef1e601 Improved: Do not use deprecated ‘Class#newInstance’
(OFBIZ-11262)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869008 13f79535-47bb-0310-9956-ffa450edef68
2019-10-26 16:20:38 +00:00
Mathieu Lirzin 8f9fa569e0 Improved: Do not use deprecated ‘Proxyclass#getConstructor’
(OFBIZ-11262)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869007 13f79535-47bb-0310-9956-ffa450edef68
2019-10-26 16:18:24 +00:00
Mathieu Lirzin 81be0b893c Improved: Do not use deprecated ‘javax.security.cert.X509Certificate’
(OFBIZ-11262)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869006 13f79535-47bb-0310-9956-ffa450edef68
2019-10-26 16:16:13 +00:00
Mathieu Lirzin deec38ec43 Improved: Refactor ‘UtilObject#getObjectException’
(OFBIZ-11261)

This moves most of the behavior inside the ‘SafeObjectInputStream’
class which has been refactored too.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869004 13f79535-47bb-0310-9956-ffa450edef68
2019-10-26 15:17:56 +00:00
Mathieu Lirzin 197d7a515b Fixed: Handle whitelist of serializable classes from properties
(OFBIZ-11261)

There was a bug regarding the way the ‘ListOfSafeObjectsForInputStream’ value
defined in the “SafeObjectInputStream.properties” file was handled.  Mistakenly
only one class identifier was allowed.

Some unit tests have been added to check that the identified bug is fixed.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869001 13f79535-47bb-0310-9956-ffa450edef68
2019-10-26 14:42:02 +00:00
Mathieu Lirzin b1aaad3af6 Implemented: Handle URI templates in request maps
(OFBIZ-11007)

It is now possible to use segmented paths by using URI templates like
‘/foo/bar/{baz}’ in the ‘uri’ attribute of <request-map> elements.

Thanks: Artemiy Rozovyk for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868963 13f79535-47bb-0310-9956-ffa450edef68
2019-10-25 21:49:35 +00:00
Mathieu Lirzin b9d9f6144c Improved: Lint ‘ControlServlet’ partially
(OFBIZ-11007)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868962 13f79535-47bb-0310-9956-ffa450edef68
2019-10-25 21:43:02 +00:00
Gil Portenseigne 48919ddc34 Improved: Remove unwanted error log by ‘ServiceSemaphore’ waiting process
(OFBIZ-11204)

This decreases the max coding style errors after r1868942 improvment

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868943 13f79535-47bb-0310-9956-ffa450edef68
2019-10-25 15:45:22 +00:00
Gil Portenseigne 41618b1208 Improved: Remove unwanted error log by ‘ServiceSemaphore’ waiting process
(OFBIZ-11204)

This commit rewrites the error handling of the semaphore release/acquire methods
to return a boolean value indicating the result of the action instead of
throwing when waiting timeout is exceeded or if other issue is met. This with
the removal of confusing error log, that are normal and intended ones.

Javadoc has been added with some refactoring in regards to checkstyle rules.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868942 13f79535-47bb-0310-9956-ffa450edef68
2019-10-25 15:24:53 +00:00
Aditya Sharma 1965e3a39a Improved: Activate / Finish EmplPositionType ValidResponsibilities
(OFBIZ-11045)
Most of code / form / screen already exist to manage EmpPositionType, except

1. menu item
2. screen menu fields
Fixed  wrong entity name in the entityCondition prepared in ListValidResponsibilities form

Thanks Olivier Heintz for reporting and providing the patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868911 13f79535-47bb-0310-9956-ffa450edef68
2019-10-25 08:51:03 +00:00
Aditya Sharma 2ea506e715 Improved: User should be notified with success message on creating shopping list in ecommerce component
(OFBIZ-9522)
On performing any action, user should be notified with the success message if the action has been performed successfully.

Thanks Chandrashekhar Dhakad for the patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868738 13f79535-47bb-0310-9956-ffa450edef68
2019-10-22 07:31:09 +00:00
Mathieu Lirzin de7a855ff5 Fixed: Use ‘ConcurrentHashMap’ to avoid ‘ConcurrentModificationException’
(OFBIZ-11258)

When trying to load components in their dependency order the
‘toBeLoadedComponents’ map is modified while being iterated over which
is not safe for non-concurrent maps.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868665 13f79535-47bb-0310-9956-ffa450edef68
2019-10-20 16:47:24 +00:00
Mathieu Lirzin 8553f0b5ae Fixed: Fix regression introduced in revision 1867409
(OFBIZ-11192)

‘null’ was an unspecified valid value for the second argument of the
‘ComponentContainer#retrieveComponentConfig’ method.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868657 13f79535-47bb-0310-9956-ffa450edef68
2019-10-20 16:13:50 +00:00
Mathieu Lirzin 2c37e2188b Improved: Move APACHE2_HEADER_FOR_XML to “src/main/resources”
(OFBIZ-11161)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868646 13f79535-47bb-0310-9956-ffa450edef68
2019-10-20 11:17:41 +00:00
Mathieu Lirzin 434a0160a2 Improved: Adapt ‘ContainerConfig#getConfigurations’
(OFBIZ-11256)

Remove unused declared ‘ContainerException’ in signature and fix the
javadoc to match the actual specification.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868630 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 14:56:50 +00:00
Mathieu Lirzin 29f814cd49 Improved: Mark ‘ContainerConfig#configurations’ as final
(OFBIZ-11256)

Use uppercase to match coding standards.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868629 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 14:29:26 +00:00
Mathieu Lirzin 2c686c4655 Improved: Avoid unecessary breakage in ‘ContainerConfig’
(OFBIZ-11256)

This restores ‘public’ modifiers on fields and move the ‘Property’
inner class back to ‘Configuration’ to avoid breakage of client code
extending the ‘Container’ interface.

In order to smooth the transition towards using getters instead of
direct field accesss, the public modifiers on fields are now marked as
deprecated.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868628 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 14:27:01 +00:00
Mathieu Lirzin f5aac701c6 Implemented: Allow deprecated public fields
(OFBIZ-11256)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868627 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 14:24:34 +00:00
Mathieu Lirzin 80c46f9c8c Improved: Add ‘PropertyChildren’ interface
(OFBIZ-11256)

This allows removing some duplicated method overloads.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868626 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 14:21:46 +00:00
Mathieu Lirzin cd130580ef Fixed: Make ‘javadoc’ build work with recent Java
(OFBIZ-11257)

With a recent OpenJDK release we had the following error

```
> Task :javadoc
javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
javadoc: error - The code being documented uses modules but the
packages defined in https://docs.oracle.com/javaee/7/api/ are in the
unnamed module.
[...]
2 errors
100 warnings

> Task :javadoc FAILED
```

With ‘javadoc --source 8’ this error disappears as described in
JDK-8212233 [1].

[1] https://bugs.openjdk.java.net/browse/JDK-8212233


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868622 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 13:30:07 +00:00
Mathieu Lirzin 4cc9ba8968 Fixed: Format ‘XmlRpcEventHandler’
(OFBIZ-10284)

This removes coding style errors introduced in revision 1868611.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868621 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 13:20:01 +00:00
Jacques Le Roux 2de3b83eca Improved: no functional change
Adds missing ASL2 header

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868619 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 08:57:14 +00:00
Jacques Le Roux 232862965e Fixed: Fix multi modal opening
(OFBIZ-11211)

Simplifies a little bit the current code.

Thanks: Leila for patch and Carl for confirmation

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868615 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 08:12:07 +00:00
Jacques Le Roux 1ef831206d Improved: Handling tenant in XmlRpcEventHandler
(OFBIZ-10284)

The XMLRPC service does not support tenants. Even if the tenant domain is 
included in the HTTP request the call does not affect the correct tenant. 
The issue and fix has been discussed in  in the thread
https://markmail.org/message/bz4dofrxqp6i7ove

jleroux: I was able to port the R16 patch provided by Rajesh to the trunk. 

Thanks: Rajesh Kumar Mallah

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868611 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 06:42:07 +00:00
Mathieu Lirzin 7e7ccba7b3 Improved: Refactor ‘ContainerConfig’ class
(OFBIZ-11256)

This removes some code duplication, make things immutable and add some javadoc.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868601 13f79535-47bb-0310-9956-ffa450edef68
2019-10-18 19:46:32 +00:00
Mathieu Lirzin 5363a7773a Improved: Use ‘checkstyle’ linting tool
(OFBIZ-11251)

Linting [1] is a software engineering practice which make the code more
readable and maintainable by improving its consistency and avoiding
potential programming mistakes.  Gradle provides a core plugin for the
‘checkstyle’ tool [2][3] which implement a linting facility for the Java
language.

The check is done with the ‘gradlew check’ command.

There are currently a lot reported errors that will need to be fixed
incrementally in the future.  We ensure that new errors will not be
introduced by defining a global threshold of “allowed” errors
corresponding to the sum of errors found in the framework and in the
official plugins.

[1] https://en.wikipedia.org/wiki/Lint_(software)
[2] https://checkstyle.org/
[3] https://docs.gradle.org/current/userguide/checkstyle_plugin.html

Thanks: Taher Alkhateeb and Jacques Le Roux for their feedback


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868597 13f79535-47bb-0310-9956-ffa450edef68
2019-10-18 14:56:50 +00:00
Jacques Le Roux 406cd08d3d Fixed: Move OrderNotificationTests.groovy from order to ecommerce
(OFBIZ-11255)

Fixes the errors in framework only tests, order and ecommerce suites tests pass


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868591 13f79535-47bb-0310-9956-ffa450edef68
2019-10-18 13:16:39 +00:00
Jacques Le Roux 6db4ffdbcd Improved: Remove unused methods related to properties in UtilProperties and
EntityUtilProperties
(OFBIZ-11254)

While removing the POS I forgot to remove specific methods I added in 
UtilProperties: setPropertyValue(*,*,*) and setPropertyValueInMemory. 
I finally found that setPropertyValueInMemory is used in one test and so maybe
usefull. setPropertyValue(*,*,*) is unused and can be safemy removed. It's also 
called from EntityUtilProperties so should also be removed there.

This removes it, and also slightly formats 
EntityUtilProperties::setPropertyValueInMemory 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868589 13f79535-47bb-0310-9956-ffa450edef68
2019-10-18 11:44:29 +00:00
Nicolas Malin 1c1daf855a Fixed: Down the log level to inform to use genericBasePermissionCheck
After the migration of genericBasePermissionCheck from mini-lang to groovy, I set a warning message to inform that we need to migrate simple-method call.

But this simple-method is massively use on standard mini-lang script and finally populate with non interesting inform the log in production site.

I down the level to inform only on development state

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868581 13f79535-47bb-0310-9956-ffa450edef68
2019-10-18 09:26:29 +00:00
Nicolas Malin 193280addb Fixed: Down the log level to inform when a property number is empty
When you call a property number undefined, UtilProperty return the default value and you have in console a warning :

    UtilProperties |W| Error converting String  to Integer; using defaultNumber 60.

Or in general if you call and resolve an empty value for a property, they is no reason to inform it as error.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868580 13f79535-47bb-0310-9956-ffa450edef68
2019-10-18 09:22:11 +00:00
Jacques Le Roux ce26d03f02 Fixed: FTL error for purchase order with Bulk Item Type
(OFBIZ-11252)

Steps to regenerate:
1. Login into the ordermgr application and click on Order Entry tab
2. Create PO with any supplier
3. Fill details and click on Continue
4. Now select Product Category with Item type Bulk and add the description and 
   Click on add to order
5.  Finalize order with Finalize Order button
6. Add Term type, ship group option, etc details and create Order.
7. Scroll down to Order Items section and See the FTL error on the screen.

Thanks: Devanshu Vyas

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868553 13f79535-47bb-0310-9956-ffa450edef68
2019-10-17 14:26:42 +00:00
Jacques Le Roux c98def05a3 Fixed: EditExample always update status, because current Status not shown
(OFBIZ-11230)

In the EditExample Form, the drop-down is populates with the Valid change status 
only. So current status is not in the list and the status print in the drop-down 
is the next authorized. I want to modify exampleName or exampleType, I go to 
editExample and change what I want and validate. The problem is status is also 
changed!

There are 12 other same or similar cases. For the first of them (in FinAccount) 
there is the same bug: when I change FinAccount Name, status change too. If I 
add current="first-in-list" in the tag drop-down it works 

jleroux: Quote is a peculiar case due to OFBIZ-7337 which was a wrong fix
 
Thanks: Oliver for the analysis and the fix 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868545 13f79535-47bb-0310-9956-ffa450edef68
2019-10-17 12:19:33 +00:00
Pawan Verma 47f1e5a75f Improved: Convert AutoAcctgAgreementTests Unit Test from XML to Groovy
(OFBIZ-11248)

Thanks: Devanshu Vyas for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868449 13f79535-47bb-0310-9956-ffa450edef68
2019-10-14 13:31:22 +00:00