@@ -28,7 +28,7 @@ worked to make these changes as minimal as possible.
28
28
### Adoption of JSpecify (https://jspecify.dev/)
29
29
30
30
Following the lead of many other projects (including The Spring Framework), we have adopted JSpecify to fully
31
- document the null handling properties of this library. JSpecify is now a runtime dependency of this library - as is
31
+ document the null handling properties of this library. JSpecify is now a runtime dependency - as is
32
32
recommended practice with JSpecify.
33
33
34
34
This change should not impact the running of any existing code, but depending on your usage you may see new IDE or
@@ -43,7 +43,7 @@ this rule:
43
43
2 . Methods with names that include "WhenPresent" will properly handle null parameters
44
44
(for example, "isEqualToWhenPresent")
45
45
46
- As you might expect, standardizing null handling revealed some issues in the library that may impact you:
46
+ As you might expect, standardizing null handling revealed some issues in the library that may impact you.
47
47
48
48
Fixing compiler warnings and errors:
49
49
@@ -53,12 +53,35 @@ Fixing compiler warnings and errors:
53
53
2 . Java Classes that extend "AliasableSqlTable" will likely see IDE warnings about non-null type arguments. This can be
54
54
resolved by adding a "@NullMarked " annotation to the class or package. This issue does not affect Kotlin classes
55
55
that extend "AliasableSqlTable".
56
+ 3 . Similarly, if you have coded any functions for use with your queries, you can resolve most IDE warnings by adding
57
+ the "@NullMarked " annotation.
58
+ 4 . If you have coded any Kotlin functions that operate on a generic Java class from the library, then you should
59
+ change the type parameter definition to specify a non-nullable type. For example...
60
+
61
+ ``` kotlin
62
+ import org.mybatis.dynamic.sql.SqlColumn
63
+
64
+ fun <T > foo (column : SqlColumn <T >) {
65
+ }
66
+ ```
67
+
68
+ Should change to:
69
+
70
+ ``` kotlin
71
+ import org.mybatis.dynamic.sql.SqlColumn
72
+
73
+ fun <T : Any > foo (column : SqlColumn <T >) {
74
+ }
75
+ ```
56
76
57
77
Runtime behavior changes:
58
78
59
79
1 . The where conditions (isEqualTo, isLessThan, etc.) can be filtered and result in an "empty" condition -
60
80
similar to java.util.Optional. Previously, calling a "value" method of the condition would return null. Now
61
81
those methods will throw "NoSuchElementException". This should not impact you in normal usage.
82
+ 2 . We have updated the "ParameterTypeConverter" used in Spring applications to maintain compatibility with Spring's
83
+ "Converter" interface. The primary change is that the framework will no longer call a type converter if the
84
+ input value is null. This should simplify the coding of converters and foster reuse with existing Spring converters.
62
85
63
86
### Other important changes:
64
87
0 commit comments