Releases: immutables/immutables
2.10.1
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
JakartaEE support
Style flag jakarta = true
Mainly package change for annotations and types like Validator
Miscellaneous
- JDK9 unmodifiable collections for
List
,Set
,Map
, style flagjdk9Collections = 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)
- guava upgrade to 30.0-jre by @elucash in #1422
- Fix sorting by id property with Criteria for Mongo #1442 by @harmenweber in #1443
- Fix #1424 - redundant null check in JDK maps by @saarmbruster in #1425
- detect the Eclipse compiler without using the TCCL by @hwellmann in #1452
- Experimental #1112 requiring Enclosing annotation by @elucash in #1423
- Enable eclipse compiler support for Java 17 and beyond. by @SimY4 in #1458
- Fix
toBuilder
generator with generics by @rdesgroppes in #1460 - Populate correct initial capacity for List/Set/Map/ImmutableList.Builder by @snazy in #1468
- Allow specifying visibility as string by @nastra in #1474
- Re-try to resolve types in java.lang by @PtrTeixeira in #1477
- re-enable jdk9 collections support. by @SimY4 in #1481
New Contributors
- @harmenweber made their first contribution in #1443
- @saarmbruster made their first contribution in #1425
- @hwellmann made their first contribution in #1452
- @rdesgroppes made their first contribution in #1460
- @snazy made their first contribution in #1468
- @PtrTeixeira made their first contribution in #1477
Full Changelog: 2.9.3...2.10.0
2.9.3
Maintenance release
What's Changed
- #1408 withUnaryOperator style flag/naming template by @elucash in #1409
- Avoid invalidating Gson type adapter cache when creating Mongo Repository by @jmoghisi in #1406
- fixing #1407 - Default value with explicit null should use default. by @SimY4 in #1410
- Fix counts in WriteResult for upsert operation by @dparamoshkin in #1412
New Contributors
- @dparamoshkin made their first contribution in #1412
- @chncaption made their first contribution in #1414
Full Changelog: 2.9.2...2.9.3
2.9.2
2.9.1
(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
- @garrettlestingi made their first contribution in #1190
- @joke made their first contribution in #1191
- @SimY4 made their first contribution in #1212
- @dmivankov made their first contribution in #1221
- @jbewing made their first contribution in #1226
- @realumhelp made their first contribution in #1224
- @stepancheg made their first contribution in #1123
- @sullis made their first contribution in #1244
- @aaylward made their first contribution in #1292
- @darichey made their first contribution in #1320
- @wisecodecraft made their first contribution in #1343
- @pthariensflame made their first contribution in #1350
- @dhoepelman made their first contribution in #1347
- @fp7 made their first contribution in #1361
- @nastra made their first contribution in #1369
- @Celebrate-future made their first contribution in #1382
2.8.8
Value
- Predictable encoding conflict resolution by Ivan Abarca (#1170 66166f3)
Criteria
- Add
toLowerCase
/toUpperCase
functions toStringMatcher
(6e4dd31) - Add
GetByKey
/DeleteByKey
operations which allow low-level key lookups and deletions (ce9ad50) - Add
isNot(boolean)
function toBooleanMatcher
(c9c6305) - Add
is(Optional)
/isNot(Optional)
to genericOptionalValueMatcher
(0c2d47e) - Add
is(Optional)
/isNot(Optional)
functions toOptionalBooleanMatcher
(c41ffaf)
Dependency Upgrades
- mongo-java-server 1.19.0 -> 1.28.0 (493eafe)
- mongo java driver (sync) 3.11.0 -> 3.12.3 (22337f3)
- mongo java driver (reactive streams) 1.12.0 -> 1.13.1 (1c34b7f)
- jackson-databind 2.8.11.4 -> 2.8.11.6 (8a2aa88)
- rxjava2 2.2.12 -> 2.2.19 (be75e8d)
- Project Reactor 3.2.12 -> 3.3.5 (13932b2)
- JUnit5 upgrade 5.5.2 -> 5.6.2 (b0b0a8a)
Contributors
Thanks to all contributors. In no particular order:
2.8.4 Generic KeyExtractor interface for Criteria
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
- Add support for Modifiable to extend an inner class/interface by Mitch Halpin (67f8083)
Criteria
- Pluggable KeyExtractor interface (3eb6958)
- Add projection support for iterable type(s) like
List<String>
(78c7c29) - Add support for Fugue Option to CriteriaModel by Charlie La Mothe (207d631)
Geode
- add tests for generating OQL expressions by Javad Moghisi (0c5e5e3)
- include order by direction in OQL by Javad Moghisi (5c3d15b)
- add support for Iterable Size and Contains to OQL Generator by Javad Moghisi (cfb514b)
- add support for String Operators to OQL Generator by Javad Moghisi(43f4fff)
ElasticSearch
- Use more efficient id lookups for key attributes in ElasticSearch backend (db4fa98)
Mongo
- Add mongo optimization to convert
$in/$nin
into$eq/$ne
for single element array (09c002c)
Mongo Repositories (legacy)
- Fix suppress warnings for generated MongoDB repositories by André Rouél (1afdfa4)
Contributors
Thanks to all contributors! In no particular order:
- Javad Moghisi (@jmoghisi)
- Mitch Halpin (@kiddkaffeine)
- André Rouél (@arouel)
- Blake Hurlburt (@blakehurlburt)
- The Alchemis (@The-Alchemist)
- Charlie La Mothe (@clamothe)
2.8.3 Minor Bugfix release for Geode backend
Minor release fixing a couple of bugs in Geode backend :
- Use JDK collections for geode bind variables when sending query to server (7cc1fb8)
- Prefer Region.getAll() method for queries which filter only on ID attribute (5426af6)
- Drop
ContainerResolver
interface (cb9d064) - Drop
NamingStrategy
interface (764d3b5)
2.8.2 Criteria DISTINCT support
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 chainingDISTINCT / 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
- Escape reserved words (eg.
type
,time
) in Geode OQL (da9b7e1)
Codegen
- Remove unnecessary empty line between
hashCode()
andtoString()
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
andjackson-datatype-jdk8
totest
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
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 toCOUNT(*)
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 javanull
(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 BSONundefined
type translated to javanull
bson4gson
adapter. Friendlier type conversion between BSON temporal types and java numbers (int / long etc.)bson4gson
adapter. Fixpeek()
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 tohashCode()
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: