All notable changes to this project will be documented in this file.
- Refactors
TransformerImplto use direct field access via reflection utilities instead of string-literal field names, improving maintainability and robustness - Eliminates redundant
ThreadLocalinitialisation by reusing the existingrootSourceStackinstance - Raises JaCoCo code coverage thresholds to 100% across all modules and adds the corresponding branch-coverage tests
- Fixes a regression introduced in 2.1.5-jdk11 where field transformers applied to collection elements were incorrectly resolved against the root source object instead of the current element, causing a NullPointerException when a flat field name mapping existed with the same name as the destination field
- Fixes an issue that was preventing the transformation of Kotlin classes with default parameter values
- Fixes MissingFieldException when mapping a root-level primitive field into a nested destination object via
withFieldMapping(issue #559) - Fixes a regression where field transformers applied to collection elements would receive
nullinstead of the element's own field value when usingsetFlatFieldNameTransformation(true)together withwithFieldMappingandwithFieldTransformer
- Bumps to the latest version available all the project dependencies
- Adds the Bill of Materials (BOM) module
- Replaces javax with jakarta
- Add the possibility to customize the special types avoiding any transformation on them
- Fixes an issue that was preventing skipping the injection for a given field. For more info about the feature see here.
- Updated
hibernate-validatorversion to6.2.1.Final(was7.0.1.Final). This replaces the jakarta validation with the javax one.
- Adds a function to reset all the defined settings
- Adds the possibility to map the same source field into multiple fields
- Adds the possibility to apply the same field transformation function on multiple fields
- Updated
eg-oss-parentversion to2.4.1(was2.4.0).
- Renames the package from
com.hotelstocom.expediagroup
- Fixes an issue that was preventing the transformation of Object type fields
- Provides new module
bull-bomthat includes all the project modules
- Provides new utilities methods
- Removes the deprecated method:
setDefaultValueSetEnabled
- Deprecates the method:
setDefaultValueSetEnabledand replaces it with:setDefaultValueForMissingPrimitiveField - Updated
hibernate-validatorversion to6.1.5.Final(was6.1.4.Final).
- Implemented transformation of JavaBeans using custom Builder pattern (see: Issue 144).
- Updated
hibernate-validatorversion to6.1.4.Final(was6.1.2.Final).
- Updated
hotels-oss-parentversion to5.0.0(was4.2.0). - Updated
commons-lang3version to3.10(was3.9).
- Testing dependencies update
- Implemented Wildcards types support (see: Issue 111).
- Implemented transformation of a field declared with its interface.
- Added method for retrieving the class getter methods.
- Testing dependencies update
- Added retry mechanism on the Bean injection in case the parameter names are not available in the compiled code.
- Modified Travis configuration in order to test the compatibility with other JDKs versions
- Removed warning leg message in case the constructor parameter names are not available in the compiled code.
- Removed
slf4j-apidependency from the library jar.
- Added specific exception message in case the constructor invoke fails due to missing parameter name in the compiled code.
- Updated
hotels-oss-parentversion to4.2.0(was4.1.0).
- Removed deprecated module
bean-utils-library, the new one is:bean-bean-transformer - The following deprecated classes has been removed:
com.expediagroup.beans.model.FieldMappingcom.expediagroup.beans.model.FieldTransformercom.expediagroup.beans.Transformer
- New specific exception in case the Field Transformation function defined is not valid
- Implemented a new functionality that allows to transform also Map object applying transformation function and mappings
Transformerclass previously in charge of the Java Bean transformation has been moved toBeanTransformer- Updated
hibernate-validatorversion to6.1.0.Final(was6.0.17.Final).
-
The module
bean-utils-libraryhas been deprecated and will be no longer available since version1.6.0, usebull-bean-transformerinstead.<dependency> <groupId>com.expediagroup.beans</groupId> <artifactId>bull-bean-transformer</artifactId> <version>x.y.z</version> </dependency>
-
Module
bean-utils-libraryhas been relocated intobull-bean-transformer. -
The following classes has been deprecated, please find below the complete list and the new one to be used:
Deprecated New one com.expediagroup.beans.model.FieldMappingFieldMappingcom.expediagroup.beans.model.FieldTransformerFieldTransformercom.expediagroup.beans.TransformerTransformer
- Implemented automatic conversion of basic types (see: Issue 61).
- Modified Transformer initialization in order to create a
Validatorinstance only if the validation is enabled - Modified Transformer initialization in order to create a
ConversionAnalyzerinstance only if the automatic conversion is enabled
- Changed sonatype credential
- Implemented possibility to disable the default value set for primitive types in case its value is null (see: Issue 73).
- Improved exception messages in order to provide more details (see: Issue 70).
- Added new maven profile:
check-for-updatesfor checking if any dependency can be updated (see: Issue 68). - Added check during project build in order to prevent the add different versions of the same dependency.
- Modified library in order to let it able to retrieve values from getters if a field does not exist (see: Issue 66).
- Improved Javadoc
- Added reference to the articles published on DZone and InfoQ
- Added possibility to define transformer function without arguments if not needed (see: Issue 62).
- Fixed a bug: FieldTransformer was receiving a default value instead of the source bean one (see: Issue 64).
- Made the project multi module
- Removed deprecated method:
setValidationDisabled - Testing dependencies update
- Modified project behaviour: since this version the "Bean Validation" is disabled by default, to enable it, the following instruction needs to be executed:
transformer.setValidationEnabled(true);
- Modified project structure in order to offer Java Bean validation feature against the defined constraints as public feature (see: Issue 57).
- In order to improve the library performances the following Changed have been applied:
- Modified no args constructor invocation in order to use
LambdaMetafactory - Modified field value retrieval in order to use
LambdaMetafactory - Modified value retrieval/set from/to source/destination object in order to minimise the executed actions
- Modified no args constructor invocation in order to use
- Updated
hotels-oss-parentversion to4.0.1(was4.0.0).
- Added support for the transformation of Java Beans built through Builder
- Improved optional usage.
- Fixed a bug that was preventing the transformer function to return a null value (see: Issue 52).
- Implemented possibility to use static transformation with a given transformer (see: Issue 44).
- Improved field value retrieval function.
- Added caching for method:
getDeclaredField
- Implemented a new feature that allows to skip the transformation for a given set of fields (see: Issue 38)
- Performance improvement
- Testing dependencies update
- Implemented a new feature that allows the copy on an existing object instance (see: Issue 24)
- Added profile:
fastthat skips the following plugin execution:javadoc,checkstyle,pmdandjacoco
- Added possibility to skip the object validation (see: Issue 31)
- Provided documentation and samples for the above functionality
- Updated
jdkversion to11(was1.8). - Updated Travis configuration in order to work with java 11
- Modified Travis configuration in order to automatically create the GitHub site as soon as a tag is created
- Added possibility to apply a transformation function only on a specific field (see: Issue 27).
- Added possibility to apply a transformation function on all fields matching with the given name without evaluating the full field path.
- Added samples and tests for the above functionality
- Fixed issue that was preventing the
Settransformation
- Added static transformation functionality (see: Issue 25).
- Made the field name mapping more flexible adding the possibility to map destination object field with field contained into nested objects.
- Added samples and tests for the above functionality.
- Updated hibernate dependency:
org.hibernate.validator(wasorg.hibernate.validator). - Removed
parallelexecution where not needed because this could cause performance degradation.
- Improved exception messaging in order to simplify the troubleshooting process
- Improved readme file
- Added dependency to:
slf4j-apias no longer available from Spring.
- Added ValidationUtils class for raising an
IllegalArgumentExceptionin case any parameter is null.
- Removed dependency:
spring-boot-starter-validationand imported one by one the required validation dependencies - Removed dependency:
spring-boot-starter-cacheand imported one by one the required validation dependencies
- Improved package-info comments
- Configured Travis in order to automatically release artifacts
- Updated
spring-bootversion to2.1.2.RELEASE(was2.1.0.RELEASE). - Updated
hotels-oss-parentversion to4.0.0(was2.3.5).
- Configured Travis in order to automatically build the application, perform a quality check and publish site. Travis build site available here
- Added build, test coverage and security badge to readme file.
- Added GitHub site build with maven.
- Added possibility to configure the transformer in order to set the default value for all destination's object fields that are not existing in the source object. See README.md for more details.
- Jumped to version
1.0.14in order to be consequent to the previous library version hosted on a private repo.
- Added changelog file.
- Removed not needed comments
- Added maven build info to the readme file.
- First
BULLrelease.