Mathieu Lirzin

Improved: Use spaces instead of tabs in “common.gradle”

Thanks: Samuel Trégouët for your contribution

Improved: Don't exclude properties and labels file from the Jar

(OFBIZ-11161)

In order to have an independent deployable jar, we need to include the

properties and labels inside the jar.

The properties and labels file was previously excluded from the jar

because it was not possible to replace the compile time values by

invalidating OFBiz caches which is convenient when developing

OFBiz. It was then necessary to reconstruct the jar and restart

OFBiz (See OFBIZ-8321 for more details).

With the recent improvment from revision 1865719 allowing to run OFBiz

without building a jar, it is now possible to enable this cache

invalidation by running both ‘gradle run’ in one shell and ‘gradlew

--continuous classes’ in a separate shell. Doing so make the

combination of editing the label files and clearing the caches use

the new value defined in the source file.

Improved: Remove redundant type declarations

Improved: Add missing override annotation

Improved: Remove unused imports

Improved: Remove unused code in ‘UtilValidate’

(OFBIZ-11172)

The code was not used in Java/Groovy/FreeMarker/XML in the framework

or official plugins.

Improved: Inline ‘UtilValidate#areEqual’

(OFBIZ-11172)

‘Objects#equals’ is already providing the same functionality of ‘null’

safe equality check.

Improved: Remove redundant "dtd" directory from classpath

(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.

    • ?
    /ofbiz-plugins/trunk/example/ofbiz-component.xml
Improved: Remove redundant "dtd" directory from classpath

(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.

Improved: Remove useless ‘GroovyScriptTestCase’

(OFBIZ-11165)

This class was useless since ‘GroovyScriptTestCase’ provides the same

interesting feature as ‘OFBizTestCase’ meaning a delegator and a dispatcher.

  1. … 3 more files in changeset.
Improved: Compile groovy integration tests

(OFBIZ-11165)

Since there is no need for dynamic reload for integration tests,

it is better to compile Groovy tests.

  1. … 47 more files in changeset.
Improved: Make ‘gradlew’ depend on :jar and :test

(OFBIZ-11162)

The default task was previously depending on :build which was requiring to

mess with the dependency graph in order to avoid executing the :distTar and

:distZip tasks which are too big to be executed by default.

It is cleaner to simply define the default tasks to :jar and :test.

Improved: Make ‘gradlew ofbiz’ depend on :classes instead of :build

(OFBIZ-11162)

It is not necessary to build the jar to run OFBiz. It is only

necessary to compile the classes in the build directory. This adapts

‘gradlew ofbiz’ to have the same dependencies as ‘gradlew run’.

Improved: Separate resources from Java source files

(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.

  1. … 36 more files in changeset.
Improved: Use method references instead of lambda inside variables

(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.

Improved: Remove useless imports

(OFBIZ-11142)

  1. … 4 more files in changeset.
Improved: Use ‘StandardCharsets.UTF_8’

(OFBIZ-11142)

  1. … 12 more files in changeset.
Improved: Use ‘java.util.Base64’

(OFBIZ-11142)

Since Java 8 a standard Base64 encoder/decoder is available. As a

consequence we can remove our embedded implementation and use it

instead.

Improved: Inline ‘UtilGenerics#checkCollection(Object)’

(OFBIZ-11141)

Improved: Inline ‘UtilGenerics#checkList’

(OFBIZ-11141)

  1. … 70 more files in changeset.
Improved: Inline ‘UtilGenerics#checkMap’

(OFBIZ-11141)

  1. … 64 more files in changeset.
Improved: Inline ‘UtilGenerics#checkSet’

(OFBIZ-11141)

Improved: Inline ‘UtilGenerics#toList’

(OFBIZ-11141)

Improved: Inline ‘UtilGenerics#toMap’

(OFBIZ-11141)

Improved: Rewrite ‘UtilGenerics#toList’ and ‘UtilGenerics#toMap’

(OFBIZ-11141)

Improved: Remove useless ‘UtilGenerics#toMap’ overloads

(OFBIZ-11141)

Improved: Rewrite ‘UtilGenerics#checkMap’ to do a simple cast

(OFBIZ-11141)

Improved: Inline ‘UtilGenerics#checkCollectionContainment’

(OFBIZ-11141)

Improved: Inline ‘UtilGenerics#checkList’

(OFBIZ-11141)

Improved: Inline ‘UtilGenerics#checkMap’

(OFBIZ-11141)