Skip to content

Releases: immutables/immutables

2.10.1

17 Feb 17:55
Compare
Choose a tag to compare

Maintenance release

What's Changed

  • Fix 'yield outside of switch expression' by @alsin in #1502
  • Allows NaturalOrdering for Comparable type hierarchies by @wjglerum in #1496

New Contributors

Full Changelog: 2.10.0...2.10.1

2.10.0

06 Oct 17:50
Compare
Choose a tag to compare

JakartaEE support

Style flag jakarta = true
Mainly package change for annotations and types like Validator

Miscellaneous

  • JDK9 unmodifiable collections for List, Set, Map, style flag jdk9Collections = true
  • Suppress from method, style flag from = ""
  • Non-strict modifiables allows reading unset attributes, style flag strictModifiables = false
  • Fixes in nested type_use annotations.
  • Performance: better initial capacity for collections
  • Refinements and fixes to Criteria modules
  • Plus many other refinements and maintance, see below

Workarounds for Gradle

  • imports for not-yet-generated types : add options.sourcepath
  • disable incremental compilation (options.incremental), may also help is some complex cases

What's Changed (since some last year's release)

New Contributors

Full Changelog: 2.9.3...2.10.0

2.9.3

13 Dec 21:23
Compare
Choose a tag to compare

Maintenance release

What's Changed

New Contributors

Full Changelog: 2.9.2...2.9.3

2.9.2

08 Sep 03:12
Compare
Choose a tag to compare

Fixes (reverts to older routine) issue affecting custom immutable annotations and meta annotation discovery in some cases leading to a deadlock: processing never finishes

2.9.1

21 Aug 20:55
Compare
Choose a tag to compare

(includes 2.9.0 release notes)

This release now requires Java 8 or later.
Fixed memory leak introduced in 2.9.0
Contains many miscellaneous fixes accumulated over many months

Special thanks to @SimY4 who made Immutables compatible with JDK11 and JDK17 environments.

What's Changed

  • Support for JDK 11 and 17 (@SimY4)
  • Criteria and Repository classes are now generated in Eclipse compiler (ECJ). #1175
  • Add caching to CriteriaContext to avoid class scanning on each instantiation. #1241
  • #1189: criteria-geode backend toLowerCase/toUpperCase add parentheses by @garrettlestingi in #1190
  • Added Bill of Materials (BoM) artifact by @joke in #1191
  • Fix SuppressWarnings by @arouel in #1208
  • Fix repository generation for custom generic types by @coreyjboyle in #1207
  • When modifiable has modifiable default field, Immutables produces syntactically invalid code. by @SimY4 in #1212
  • Fix addAll(Iterator) NPE by @dmivankov in #1221
  • Remove redundant equality checks in with... methods on enum members by @jbewing in #1226
  • Write META-INF/services files when annotation processing is over by @arouel in #1235
  • resolve auto-module-name generation by @realumhelp in #1224
  • Bean friendly modifiable from method return converted result. by @SimY4 in #1211
  • Truncate strings or values of type variables in toString method that are longer than a defined length by @arouel in #1185
  • Diagnostics for NPE in SourceOrdering by @stepancheg in #1123
  • SuppressedWarnings: if it's deprecated, also suppress forRemoval by @stevenschlansker in #1156
  • replace TravisCI with GitHub Actions CI by @sullis in #1244
  • Immutables to build on all JDKs 8+ by @SimY4 in #1247
  • Fix some previously broken extensions support. by @SimY4 in #1249
  • Issue/bug 1245 by @SimY4 in #1279
  • Added eclipse compiler to build matrix by @SimY4 in #1280
  • Support abstract classes declaring static interned instances of their own type by @Stephan202 in #1274
  • Update README.md by @aaylward in #1292
  • Fresh fixes by @elucash in #1306
  • Java 16 compat by @SimY4 in #1326
  • Java 17 compat. by @SimY4 in #1328
  • Forward Encoding method parameter annotations by @darichey in #1320
  • Final Java 17 support by @SimY4 in #1337
  • Add sample code to demonstrate getter usage by @wisecodecraft in #1343
  • Fix five flaky tests in value-fixture by @pthariensflame in #1350
  • Use Java 17 target on Java 17. by @SimY4 in #1340
  • fixtures with and without errorprone by @SimY4 in #1341
  • [annotate] Fix javadoc typos by @piomar123 in #1345
  • Emit compile error when using @value annotations on records by @dhoepelman in #1347
  • No explicit opens by using Add Opens manifest entry. by @SimY4 in #1354
  • Add Opens follow up. by @SimY4 in #1356
  • #1360 Prepend synthetic with this in equalTo(int, T) by @fp7 in #1361
  • Using (lazyhash = true)+Serializable should always make the computed hashCode field transient by @nastra in #1369
  • Improve error msg for null values in JDK Maps by @nastra in #1371
  • Could org.immutables:testing:2.9.1-SNAPSHOT drop off redundant dependencies? by @Celebrate-future in #1382

New Contributors

2.8.8

08 May 23:52
Compare
Choose a tag to compare

Value

Criteria

  • Add toLowerCase / toUpperCase functions to StringMatcher (6e4dd31)
  • Add GetByKey / DeleteByKey operations which allow low-level key lookups and deletions (ce9ad50)
  • Add isNot(boolean) function to BooleanMatcher (c9c6305)
  • Add is(Optional) / isNot(Optional) to generic OptionalValueMatcher (0c2d47e)
  • Add is(Optional) / isNot(Optional) functions to OptionalBooleanMatcher (c41ffaf)

Dependency Upgrades

Contributors

Thanks to all contributors. In no particular order:

2.8.4 Generic KeyExtractor interface for Criteria

27 Apr 22:13
Compare
Choose a tag to compare

Introduce KeyExtractor interface to Criteria for pluggable entity key definition and extraction. Other improvements in different backend implementations.

Support for Modifiables to extend an inner class/interface.

Value

  1. Add support for Modifiable to extend an inner class/interface by Mitch Halpin (67f8083)

Criteria

  1. Pluggable KeyExtractor interface (3eb6958)
  2. Add projection support for iterable type(s) like List<String> (78c7c29)
  3. Add support for Fugue Option to CriteriaModel by Charlie La Mothe (207d631)

Geode

  1. add tests for generating OQL expressions by Javad Moghisi (0c5e5e3)
  2. include order by direction in OQL by Javad Moghisi (5c3d15b)
  3. add support for Iterable Size and Contains to OQL Generator by Javad Moghisi (cfb514b)
  4. add support for String Operators to OQL Generator by Javad Moghisi(43f4fff)

ElasticSearch

  1. Use more efficient id lookups for key attributes in ElasticSearch backend (db4fa98)

Mongo

  1. Add mongo optimization to convert $in/$nin into $eq/$ne for single element array (09c002c)

Mongo Repositories (legacy)

  1. Fix suppress warnings for generated MongoDB repositories by André Rouél (1afdfa4)

Contributors

Thanks to all contributors! In no particular order:

2.8.3 Minor Bugfix release for Geode backend

12 Dec 23:59
Compare
Choose a tag to compare

Minor release fixing a couple of bugs in Geode backend :

  1. Use JDK collections for geode bind variables when sending query to server (7cc1fb8)
  2. Prefer Region.getAll() method for queries which filter only on ID attribute (5426af6)
  3. Drop ContainerResolver interface (cb9d064)
  4. Drop NamingStrategy interface (764d3b5)

2.8.2 Criteria DISTINCT support

16 Nov 06:42
Compare
Choose a tag to compare

Main feature of this release is DISTINCT statement in Criteria. Plus, small functionalities and bugfixes.

Notable changes

Criteria

  • Support for DISTINCT modifier in queries. Simple DSL to allow chaining DISTINCT / LIMIT / OFFSET modifiers (9d639225)
// example of DISTINCT query
repository.find(person.isActive.isTrue())
     .orderBy(person.name.asc())
     .select(person.name)
     .distinct()
     .limit(2)
     .fetch();

Geode backend

Codegen

  • Remove unnecessary empty line between hashCode() and toString() functions introduced by previous commit
  • Suppress ErrorProne error (with @SuppressWarnings(Immutable)) for lazy hashCode field (#1114)

Gson / JSON Adapters

  • Fixed issue where integers are always printed as doubles (#1120) by Ben Mazzarol (@bmazzarol)
  • Fixed issue using the jackson XML streaming parser where boolean tokens are always strings (#1120) by Ben Mazzarol (@bmazzarol)

Other changes

  • Change dependency scope of jackson-datatype-guava and jackson-datatype-jdk8 to test in ElasticSearch backend. They were used only in tests.
  • Enable errorprone static analysis in criteria module (ef5f1a267)

Thanks to all contributors:

2.8.1 Criteria & Repositories API, Update

19 Oct 07:14
Compare
Choose a tag to compare

Immutables team is happy to announce Immutables 2.8.1 release.

This release 2.8.1 comes one month after 2.8.0 and contains several improvements, bugfixes and new functionalities.

Notable changes

Criteria

  • Generate criteria DSL from existing JavaBeans(spec) classes. Useful for projects which use JavaBeans for legacy reasons or not yet fully migrated to immutables. See #1103
  • Pluggable ID resolution. Introduce IdResolver interface to allow users to provide their own annotations (or logic) for ID attribute selection. It complements default @Criteria.Id annotation.
  • Initial support for partial updates. Allow partial changes to be applied directly by the backend (if supported).
repository.update(person.id.is(123))
  .set(person.name, "Changed Name")
  .set(person.age, 33)
  .execute()
  • Support top-level count() operation similar to COUNT(*) in SQL
repository.findAll().count();
repository.find(person.age.greaterThan(33)).count();
  • Add upsert / update operations on entity in Writable interface

Mongo jackson adapter

  • Support BSON undefined type which is converted to java null (9a64881)
  • Support BSON binary data (76fb7b44)
  • Lazily read values from bson stream (1c07466). Potentially a performance improvement since values don't have to be deserialized unless required by deserializer. Allows faster skipChildren() calls.
  • Make BsonGenerator null safe on strings and numbers (ba78d7)

Mongo repositories

Changes related to mongo repositories (predecessor to criteria).

  • Enable _id initialization in MongoDB (#1074). PR from André Rouél
  • bson4gson adapter. Support BSON undefined type translated to java null
  • bson4gson adapter. Friendlier type conversion between BSON temporal types and java numbers (int / long etc.)
  • bson4gson adapter. Fix peek() method in JsonReader (6f1247)
  • Require Java 8

Codegen

  • Support lazy hashing via lazyhash attribute. Contrary to existing prehash, lazyhash would compute hashcode on first access to hashCode() method.
  • Changed how META-INF/annotations/org.immutables.value.immutable is read - disabled URLConnection caching. PR-1060 from Canay ÖZEL
  • Set optBits for Modifiable, Default maps. PR-1086 from Dylan Wragge

Third party library upgrades and other dependencies

  • Jackson databind 2.8.11.3 -> 2.8.11.4 (9ea18)
  • Mongo java (sync) driver 3.10.1 -> 3.11.0 (33f98d4)
  • Mongo reactive streams 1.11 -> 1.12 (fed2e07)
  • rxjava2 2.2.10 -> 2.2.12 (c6e06ce)
  • ErrorProne 2.3.2 -> 2.3.3 (b62fab4f)
  • Remove utility maven module (1089). All modules will declare dependencies explicitly.

Thanks to all contributors. In no particular order: