(OFBIZ-11192)
The unnecessary declared ‘ContainerException’ exception has been removed. A
switch statement has been used and the javadoc has been rewritten.
Additionally the method has been renamed to ‘ComponentContainer#loadComponent’.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867499 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-11192)
This redefines the ‘ComponentLoaderConfig#ComponentDef’ class by
removing its unused name attribute.
The ‘java.nio.file’ API has been used to represent the relative path
of a component location.
Various cleanups and Javadoc added.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867394 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8341)
In many Java and Groovy files we have auto generated catch blocks or empty catch
blocks.
To avoid such exception swallowing this should be improved to at least log the
error and also return error in case of service.
Last ones :)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866958 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8341)
In many Java and Groovy files we have auto generated catch blocks or empty catch
blocks.
To avoid such exception swallowing this should be improved to at least log the
error and also return error in case of service.
Here we use 3 try-with-ressource blocks and log some errors
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866957 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8341)
In many Java and Groovy files we have auto generated catch blocks or empty catch
blocks.
To avoid such exception swallowing this should be improved to at least log the
error and also return error in case of service.
Here we use a try-with-ressource block and log some errors
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866952 13f79535-47bb-0310-9956-ffa450edef68
In my previous commit I forgot I used FileUtile::normalizePath (old name
of now normalizeFilePath) in FileUtile::getFile. This is useless, and reverted
here
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866927 13f79535-47bb-0310-9956-ffa450edef68
While working on OFBIZ-11196,I renamed the normalizePath() method in FileUtil
class to createFileWithNormalizedPath() and added the normalizeFilePath()
method which deals only with String (in -> out), could be useful later...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866924 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10837)
Fixes CVE-2019-0189
Allows users to easily override the list of accepted objects by using the
listOfSafeObjectsForInputStream property
CVE-2019-0189
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866834 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-11159)
The log level for missing labels in UtilProperties is set to Info.
This should however be, at least, of level warning.
Thanks: Pierre Smits for the Jira
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1865819 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-11161)
the "dtd" directories are already present as resources distributed
inside OFBiz jar, so there is no need to augment the classpath to find
the XML schema inside those directories.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1865796 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-11165)
This class was useless since ‘GroovyScriptTestCase’ provides the same
interesting feature as ‘OFBizTestCase’ meaning a delegator and a dispatcher.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1865787 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-11161)
This moves the resource files in a dedicated "src/main/resources"
directory. This convention follows the Maven standard directory
layout which is the convention used by default in Gradle.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1865717 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-11156)
We need to provide a JNDI environment property for Solr to load faster
Fixes previous commit where I hastily harcoded in jndi.properties file
Used a system property which can be used to define a JNDI environment
property
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1865347 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-11151)
Removes the last Java code warnings by using @SuppressWarnings("rawtypes")
for the org.owasp.esapi.codecs.Codec
I see no better solution since we have no access to this code.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1865017 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10817)
Lambda expressions are not meant to be stored inside variables. In
most cases it is better to define a static method and use a method
reference instead. Static methods have the benefits of having a more
explicit signature and some javadoc attached to them.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1864953 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7532)
To display a number we had different possibilities :
* on ftl use the template <@ofbizAmount and <@ofbizCurrency
* by java call a function UtilFormatOut.formatAmount, UtilFormatOut.formatPrice, UtilFormatOut.formatQuantity, etc..
* by form widget, use <display type=accounting-number for accounting but nothing for other
To simplify and homogenize all, I implemented a number type purpose :
* default: display a number by default, use when no purpose is present
* quantity: display a number as a quantity
* amount: display a number as an amount (like price without currency)
* spelled: litteral displaying for a number (use on <@ofbizAmount ftl only before)
* percentage: display a number as a percentage
* accounting: diplay a number for accounting specific
Each purpose can be associate to a number for displaying it :
* on ftl <@ofbizNumber number=value format=purpose/>
* on java UtilFormatOut.formatNumber(value, purpose, delegator, locale)
* on form widget <display type=number format=purpose/>
The format use by a purpose is define on framework/common/config/number.properties with the template
.displaying.format = ##0.00
With this, you can surchage a configuration, create your own purpose or surchage only one through entity SystemProperty.
Concerning the backware compatibility:
* For the ftl the template <@ofbizAmount is now a link to '<@ofbizNumber format=amount'
* For java all previous function call UtilFormatOut.formatNumber with the matching purpose
* For form xml accounting-number is managed as an exection
Last point, display a currency is different that a number, so I didn't refactoring some code for this case (only move properties from general to number for centralize de configuration on the same file)
Thanks Charles Steltzlen to start the refactoring
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1864832 13f79535-47bb-0310-9956-ffa450edef68