MapStruct 1.6.1 bug fix released

It is my pleasure to announce the 1.6.1 bug fix release of MapStruct. This release includes 1 enhancement and 8 bug fixes, including some regressions introduced in 1.6.0.

With this release we support the use of the Java 19 LinkedHashSet and LinkedHashMap factory methods.

LinkedHashSet and LinkedHashMap factory method

With this release if your source code is Java 19 or later MapStruct is going to use the new factory methods when creating a Set or Map

On Java 18 or earlier it looks like

Map<AuctionDto, AuctionDto> map = new LinkedHashMap<AuctionDto, AuctionDto>( Math.max( (int) ( auctions.size() / .75f ) + 1, 16 ) );
Set<TargetFoo> set = new LinkedHashSet<TargetFoo>( Math.max( (int) ( foos.size() / .75f ) + 1, 16 ) );

Whereas on Java 19 or later it looks like

Map<AuctionDto, AuctionDto> map = LinkedHashMap.newLinkedHashMap( auctions.size() );
Set<TargetFoo> set = LinkedHashSet.newLinkedHashSet( foos.size() );

Thanks

Thanks to our entire community for reporting these errors.

In alphabetic order this are all the contributors that contributed to the 1.6.1 release of Mapstruct:

We are also accepting donations through Open Collective or GitHub. We’d like to thank all the supporters that supported us with donations in this period:

Happy coding with MapStruct 1.6.1!!

Download

You can fetch the new release from Maven Central using the following GAV coordinates:

Alternatively, you can get ZIP and TAR.GZ distribution bundles - containing all the JARs, documentation etc. - from GitHub.

If you run into any trouble or would like to report a bug, feature request or similar, use the following channels to get in touch:

comments powered by Disqus