Clone
 

samuel trégouët <samuel.tregouet@nereide.fr> in ofbiz-framework

Improved: Resolve classpath conflict on `freemarkerTransforms.properties` (OFBIZ-11161)

All files in {compoment}/config directories are placed in jar

root (cf. sourceSets definition in build.gradle) but there are 4 different

`freemarkerTransforms.properties` in ofbiz (content, product, webapp, widget).

This works fine because we are adding config directories in classpath (through

classpath tag in ofbiz-component.xml), but this is not really intuitive. So to

make things clearer this patch move `freemarkerTransforms.properties` into

`src/main/resources` with a namespace package and `FreeMarkerWorker.java` is

modified accordingly.

Fixed: Use ‘WebAppUtil#parseWebXmlFile’ when handling “web.xml” files (OFBIZ-6993)

# Conflict handled by hand in:

# framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java

Fixed: Use ‘WebAppUtil#parseWebXmlFile’ when handling “web.xml” files (OFBIZ-6993)

Fixed: Use ‘WebAppUtil#parseWebXmlFile’ when handling “web.xml” files (OFBIZ-6993)

# Conflict handled by hand in:

# framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java

Improved: Update “web.xml” files version 3.0 → 4.0 (OFBIZ-6993)

  1. … 10 more files in changeset.
Fixed: add XML declaration in “web.xml” files (OFBIZ-6993)

these declarations avoid SAXParseException traceback when parsing web.xml

the first time in WebappUtil.parseWebXmlFile

  1. … 10 more files in changeset.
Fixed: Add XML declaration in “web.xml” files (OFBIZ-6993)

These declarations avoid SAXParseException traceback when parsing web.xml

the first time in WebappUtil.parseWebXmlFile

  1. … 10 more files in changeset.
Fixed: add XML declaration in “web.xml” files (OFBIZ-6993)

these declarations avoid SAXParseException traceback when parsing web.xml

the first time in WebappUtil.parseWebXmlFile

  1. … 10 more files in changeset.
Fixed: Add XML declaration in “web.xml” files (OFBIZ-6993)

These declarations avoid SAXParseException traceback when parsing web.xml

the first time in WebappUtil.parseWebXmlFile

  1. … 10 more files in changeset.
Fixed: add XML declaration in “web.xml” files (OFBIZ-6993)

these declarations avoid SAXParseException traceback when parsing web.xml

the first time in WebappUtil.parseWebXmlFile

  1. … 10 more files in changeset.
Fixed: Remove dependency management from ‘ComponentContainer’ (OFBIZ-11275)

This fixes a bug identified by ‘testCheckDependencyForComponent’ where

the dependencies declared inside component configurations were not

impacting the component retrieval order.

Component configurations stored in the cache can now be properly

sorted based on their <depends-on> declaration. The new

‘ComponentConfig#sortDependencies’ method returns a collection of

component configuration following a topological ordering.

In case of dependency cycle we throw an error.

Improved: Remove ‘ServiceEventHandler#checkSecureParameter’ (OFBIZ-11260)

There is no security reason justifying to prevent the invocation of

service event handlers with URI parameters if we accept request body

parameters. As a consequence it is preferable to unconditionally

accept URI parameters and remove the

‘service.http.parameters.require.encrypted’ configuration property.

    • -4
    • +0
    /framework/webapp/config/url.properties
Improved: Lint ‘ServiceEventHandler’ class (OFBIZ-11260)

Fixed: Remove dependency management from ‘ComponentContainer’ (OFBIZ-11275)

This fixes a bug identified by ‘testCheckDependencyForComponent’ where

the dependencies declared inside component configurations were not

impacting the component retrieval order.

Component configurations stored in the cache can now be properly

sorted based on their <depends-on> declaration. The new

‘ComponentConfig#sortDependencies’ method returns a collection of

component configuration following a topological ordering.

In case of dependency cycle we throw an error.

Implemented: Add a generic directed graph utilitary class (OFBIZ-11275)

Implemented: Show dependency resolution algorithm problem (OFBIZ-11275)

This adds a test demonstrating a bug in the dependency resolution

algorithm done in ‘ComponentContainer’.

When relying on <depends-on> declaration in “ofbiz-component.xml”

files we should expect to retrieve components (and their associated

containers) in a topological ordering meaning a linear ordering where

each component configuration element is placed after its dependencies

configuration elements. Currently this is not the case and the

dependency declarations only impact the construction of the dynamic

classpath.