github vavr-io/vavr v1.1.0

2 hours ago

Vavr 1.1.0 is out - a maintenance-heavy minor release focused on correctness and performance of the 1.x line.

This release wasn't planned. Most of these fixes were made during work on Vavr 2.0.0, but they turned out to be easy to backport, and there was no good reason to make 1.x users wait for them. So here they are.

Huge thanks to everyone who contributed!

Highlights

Faster LinkedHashMap / LinkedHashSet (#3302, #3303, #3292, #3294)

put() for an already-present key is now O(1) instead of O(n), and the internal insertion-order structure was switched from Queue to Vector.

Serialized instances from 1.0.1 can still be deserialized.

Either#transform (#3268)

Either gets the missing transform(Function<? super Either<L, R>, ? extends U>), consistent with the rest of the Vavr types.

Better Null-Safety Annotations (#3266, #3317)

Missing JSpecify annotations were added, including @NonNull on Option's type parameter.

Behavior Changes Worth Knowing

These are bug fixes, but they may change observable behavior if you did not pay attention to the contract:

  • Try.Failure#equals now also compares the exception type and message, not just stack traces (#3274)
  • Try#andFinallyTry() no longer swallows the original failure when the finalizer also throws (#3288)
  • Map#replace(Tuple2, Tuple2) now checks the full entry, not just the key (#3289)
  • Queue#replace now replaces only the first occurrence (#3271)
  • Multimap#isDistinct() no longer returns true for SEQ containers (#3286)

What's Changed

New Contributors

Full Changelog: v1.0.1...v1.1.0

Don't miss a new vavr release

NewReleases is sending notifications on new releases.