(OFBIZ-10198)
This patch extends the current UtilHttp.urlEncodeArgs() method with an
additional input parameter: boolean preserveEmpty.
It allows to get a query string with empty parameters, useful if the
receiver expects mandatory parameters or wants to explicit
override/clear existing values with an empty one.
Thanks Martin Becker for reporting and providing the patch.
(OFBIZ-11331)
Running ComponentContainerTest on windows fails due to parsing of paths of the
form '/c:/dev/....'
org.apache.ofbiz.base.container.ComponentContainerTest >
testCheckDependencyForComponent FAILED
java.nio.file.InvalidPathException at ComponentContainerTest.java:44
Line 44:
private Path ofbizHome = Paths.get(ComponentContainerTest.class.getResource
("testsdata").getFile()).toAbsolutePath().normalize();
PR created: #8
Thanks: Daniel WatfordNina Simone - My Baby Just Cares For Me.mp3
Those directories are already added in the classpath by the build
system. The classpath info defined in “ofbiz-component.xml” files are
now only used to retrieve label files.
(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.
(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.
(OFBIZ-11281)
StringUtil#strToMap(String, String, boolean, String) throws Nullpointer for StringUtil.strToMap("", false).
Thanks to Ulrich Heidfeld for this fix
(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.
(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.
(OFBIZ-11265)
Service parameter with allow-html="safe" does not check the OWASP sanitizer flag
ie. enabled or not and perform sanitization which causing policy error while
editing text data
getting following exception error:
"In field [textData] by our input policy, your input has not been accepted for
security reason. Please check and modify accordingly, thanks."
Thanks: Pradeep Choudhary for report and suggestion
(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
(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
(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
(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
(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
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
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
(OFBIZ-11192)(OFBIZ-11238)
The validity checks have been moved at construction time instead of
relying on client code to ensure that the class path information are
sound.
A new ‘ComponentConfig.ClasspathInfo.Type’ enum has been defined to
improve type safety.
The location of the class path information is now using a
‘java.nio.file.Path’ class instance.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868030 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-11192)
The method ‘ComponentConfig#getRootLocation’ has been removed
and replaced by ‘ComponentConfig#rootLocation’.
The callers have been adapted.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868028 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-11237)
This class has been moved to ‘org.apache.ofbiz.base.container’ to be
able to reduce its visibility to the “package” level.
The API has been change to avoid unnecessary checks and simpler dataflow.
There was no need to provide thread safety so the ‘synchronized’
blocks have been removed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868027 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-11213)
This refactoring was initiated since using UelFunction::getSize throws
ClassCastException and log a consequent unneeded stack trace to test
Object class type. The log is unnecessary, because it is the result of
each supported class cast trial.
This issue show up that lot of possible NPE were not checked against,
but catched by 'Exception'.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867635 13f79535-47bb-0310-9956-ffa450edef68