Skip to content

Commit 9b23570

Browse files
committed
Doc updates
1 parent c907a42 commit 9b23570

File tree

2 files changed

+28
-9
lines changed

2 files changed

+28
-9
lines changed

CHANGELOG.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,15 @@ worked to make these changes as minimal as possible.
2828
### Adoption of JSpecify (https://jspecify.dev/)
2929

3030
Following the lead of many other projects (including The Spring Framework), we have adopted JSpecify to fully
31-
specify the null handling properties of this library. In general, the library does not expect that you will pass a null
32-
value into any method. There are two exceptions to this rule:
31+
document the null handling properties of this library. JSpecify is now a runtime dependency of this library - as is
32+
recommended practice with JSpecify.
33+
34+
This change should not impact the running of any existing code, but depending on your usage you may see new IDE or
35+
tooling warnings based on the declared nullability of methods in the library. You may choose to ignore the
36+
warnings and things should continue to function. Of course, we recommend that you do not ignore these warnings!
37+
38+
In general, the library does not expect that you will pass a null value into any method. There are two exceptions to
39+
this rule:
3340

3441
1. Some builder methods will accept a null value if the target object will properly handle null values through the
3542
use of java.util.Optional
@@ -38,12 +45,20 @@ value into any method. There are two exceptions to this rule:
3845

3946
As you might expect, standardizing null handling revealed some issues in the library that may impact you:
4047

41-
Case-insensitive conditions like "isLikeCaseInsensitive" will now throw a NullPointerException if you pass in null
42-
values.
48+
Fixing compiler warnings and errors:
49+
50+
1. We expect that most of the warnings you encounter will be related to passing null values into a where condition.
51+
These warnings should be resolved by changing your code to use the "WhenPresent" versions of methods as those
52+
methods handle null values in a predictable way.
53+
2. Java Classes that extend "AliasableSqlTable" will likely see IDE warnings about non-null type arguments. This can be
54+
resolved by adding a "@NullMarked" annotation to the class or package. This issue does not affect Kotlin classes
55+
that extend "AliasableSqlTable".
56+
57+
Runtime behavior changes:
4358

44-
The where conditions (isEqualTo, isLessThan, etc.) can be filtered and result in an "empty" condition -
45-
similar to java.util.Optional. Previously, calling a "value" method of the condition would return null. Now
46-
those methods will throw "NoSuchElementException". This should not impact you in normal usage.
59+
1. The where conditions (isEqualTo, isLessThan, etc.) can be filtered and result in an "empty" condition -
60+
similar to java.util.Optional. Previously, calling a "value" method of the condition would return null. Now
61+
those methods will throw "NoSuchElementException". This should not impact you in normal usage.
4762

4863
### Other important changes:
4964

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ The library test cases provide several complete examples of using the library in
7878
| Kotlin | Spring JDBC | Example using Kotlin utility classes for Spring JDBC Template | [../examples/kotlin/spring/canonical](src/test/kotlin/examples/kotlin/spring/canonical) |
7979

8080

81-
## Requirements
81+
## Requirements and Dependencies
8282

83-
The library has no dependencies. Version 2.x requires Java 17. Version 1.x requires Java 8.
83+
Version 2.x requires Java 17 and has a required runtime dependency on JSpecify (https://jspecify.dev/). Version 1.x
84+
requires Java 8 and has no required runtime dependencies.
85+
86+
All versions have support for MyBatis3, Spring Framework, and Kotlin - all those dependencies are optional. The library
87+
should work in those environments as the dependencies will be made available at runtime.

0 commit comments

Comments
 (0)