Checkout Tools
  • last updated 6 hours ago
Constraints: committers
Constraints: files
Constraints: dates

Changeset 1863473 is being indexed.

"Applied fix from trunk for revision: 1835871"


r1835871 | surajk | 2018-07-14 07:35:44 +0200 (sam. 14 juil. 2018) | 10 lignes

Improved: All existing party contact mechs should be deleted before creating new one.


Currently, everywhere in code base, before creating new party contact mech record, we use

deletePartyContactMechPurposeIfExists service to delete old records. But, problem is

<first-from-list is used everywhere which only deletes first fetched record.

All previous records should also gets deleted before creating new party contact mech purpose for a specific purpose type.


Improved: Remove useless ‘UtilObject#compareToHelper’


Improved: Remove useless ‘UtilObject#getBytes’


Improved: Remove useless ‘UtilObject#equalsHelper’


Improved: Remove ‘UtilMisc#toList’


Improved: Refactor ‘Makeparamlistwithsuffix’


Implemented: Add unit tests for ‘UtilHttp#makeParamListWithSuffix’


Adapt implementation to facilitate mocking.

Improved: Refactor ‘UtilHttp#makeParamValueFromComposite’


Use ‘LocalDateTime’ instead of ‘Calendar’ and

‘HttpServletRequest#getParameterMap’ instead of


The tests and callers has been adapted to remove the ‘locale’ arguments which

made sense only for ‘Calendar’.

Implemented: Add unit tests for ‘UtilHttp#makeParamValueFromComposite’


The implementation has been adapted to facilitate mocking.

Improved: Use ‘HttpServletRequest#getParameterMap’ when possible

It is better to avoid using obsolete ‘Enumeration’ class when possible

so the calls to ‘HttpServletRequest#getParameterNames’ has been

replaced by ‘HttpServletRequest#getParameterMap’.

Improved: Remove useless ‘UtilHttp#parametersToAttributes’


This method was so trivial that it doesn't make sense to provide it.

Improved: Remove unused ‘UtilHttp#checkURLforSpiders’


It was not used anywhere in the framework or the official plugins.

Improved: Use a predicate in ‘UtilHttp#getParameterMap’


Improved: Use a predicate in ‘UtilHttp#getPathInfoOnlyParameterMap’


Improved: Refactor ‘UtilHttp#getParameterMap’


Implemented: Add unit tests for ‘UtilHttp#getParameterMap’


Adapt slightly the implementation to make mocking easier.

Improved: Remove unused ‘UtilHttp#getParameterMap’ overload


Improved: Refactor ‘UtilHttp#getPathInfoOnlyParameterMap’


Implemented: Add unit tests for ‘UtilHttp#getPathInfoOnlyParameterMap’


Improved: Inline one ‘UtilHttp#getPathInfoOnlyParameterMap’ overload


‘getPathInfoOnlyParameterMap(HttpServletRequest, Set, Boolean)’ was

used only once and was not adding much to

‘getPathInfoOnlyParameterMap(String, Set, Boolean)’.

Improved: Do not use ‘UtilMisc#toList’


Improved: Upgrade Hamcrest library to version 2.1


Improved: Remove unnecessary dependency on ‘junit-dep’ artifact


Prior to Junit 4.11, Junit was distributed in two forms ‘junit’ and

‘junit-dep’ where the first was embedding the hamcrest matchers the

second was defining a dependency to it which is more desirable in the

context of package managers like Maven or Gradle. Starting with Junit

4.11 only the second form is distributed which makes ‘junit-dep’


Improved: Move ‘AdminServer’ inside a container


‘AdminServer’ provides a portable way to manage life-cycle of the OFBiz

process remotely by allowing administrator to check its running status

or shutting it down.

Previously the ‘AdminServer’ class was a special thread opening a

socket and launched at startup. However since this class is about

managing some run-time resources with a life-cycle, it matches perfectly

the container abstraction.

A benefit of making ‘AdminServer’ a container is that the startup

process is now simpler and more uniform.

Administrators can now prevent remote shutdown of OFBiz for security

reasons by removing the container declaration. Additionally They can

delegate the process management job to the init process (PID 0) of the

hosting system like Systemd [1] by replacing this container with

another one.

[1] https://www.freedesktop.org/software/systemd/man/systemd-notify.html

Improved: Pass directly the loaders to ‘loadContainersFromConfigurations’


Since only the loaders are used from the configuration, it is better

to pass those directly as a parameter to the

‘loadContainersFromConfigurations’ method instead of the full

configuration object.

Improved: Access configurations inside ‘loadContainersFromConfigurations’


This avoids passing an extra argument to


Improved: Inline ‘filterContainersHavingMatchingLoaders’


The filtering of matching loaders is now done directly inside the

‘loadContainersFromConfigurations’ method.

Improved: Deprecate ‘ContainerConfig#getConfiguration(String, String)’


Since there is no global container configuration file anymore this

method should not be used. It has been superseded by an overload

which do not require to pass the file name of the configuration file.

Improved: Remove support for “ofbiz-containers.xml”


To extend the containers loaded on startup, it was possible too both

edit the “ofbiz-containers.xml” file or alternatively to define a

container in a component.

This redundancy adds extra complexity in the startup process for no

good extensibility reason. The component container loader is more

flexible since it allows developper to add new containers without

touching the framework so it is better to only rely on this option.

The component loader is now hard-coded directly in code.

Removes the Gradle Wrapper files copies in tools\Buildbot\Gradle\Wrapper

The Gradle Wrapper files will stay in branches and trunk, so not point getting

them during builds. As we know all we be handled during RM.