If a type is resolved using the instanceof method, there is no need to explicitly cast the type.
This is thanks to the addition of JEP 394: Pattern Matching for instanceof in Java 16.
For example, a CriteriaFilterProcessor.java might change to the following:
AS-IS
if (value instanceof Box) {
geoBBox = GeoBox.fromBox((Box) value);
}
TO-BE
if (value instanceof Box box) {
geoBBox = GeoBox.fromBox(box);
}