v4.0.1
Correctness check for equals() implementations
Added a check that equals overrides are declared correctly, i.e., the argument must be nullable for the equals() contract "x.equals(null) must return false" to be fulfilled. If the contract is violated, instrumentation will be aborted with an error message.
Rationale
public boolean equals(Object) must be implemented in a way such that x.equals(null) evaluates to false. Therefore, equals(null) must neither throw a NullPointerException nor an AssertionError. Many IDEs offer automatic equals() and hashCode() generation but do not take into account when this is done in a @NullMarked context, resulting in hard to find errors.
This check is only performed for equals() implementations that override Object.equals(Object), not for overloads using a different type.
Fix: instrumentation failed when optional modules were not on the module path
Fixed an issue where instrumentation failed when modules with optional dependencies were on the module path. (#22)
Improve compatibility with Gradle build and configuration caches
The plugin was refactored for better compatibility with the Gradle configuration and build caches.
Maven example is built in build.sh
The Maven example previously was not automatically built and so bugs could go undetected. The example is now automatically built. In addition, the correct plugin version is now determined automatically and does not to have updated manually anymore.