Subject: [pgjdbc/pgjdbc] issue #3634: Migrate nullability annotations from checkerframework to jspecify

From: "vlsi (@vlsi)" <[email-masked]>
Date: Wed, 21 May 2025 17:50:15 +0000

JSpecify has been released 1.0.0, and Kotlin compiler treats those annotations strictly since 2.1.

It makes sense to go for JSpecify nullability annotations.

It would probably count as a minor version bump.

See https://jspecify.dev/docs/start-here/

---

From: "vlsi (@vlsi)" <[email-masked]>
Date: Sat, 31 May 2025 09:16:41 +0000

Guava has recently switched to jspecify: https://github.com/google/guava/releases/tag/v33.4.4

---

From: "lobaorn-bitso (@lobaorn-bitso)" <[email-masked]>
Date: Wed, 04 Jun 2025 19:05:42 +0000

Hey @vlsi just to add more here, recently JUnit did it as well for 6.0.0-M1. To avoid manual work, I would suggest going in the direction of using OpenRewrite (https://www.moderne.ai/blog/mass-migration-of-nullability-annotations-to-jspecify / https://docs.openrewrite.org/recipes/java/jspecify) for this. Although there is no specific recipe for migrating from CheckerFramework to JSpecify, it should be quite similar to the other ones, using a YAML approach. Other than that, I believe you could use IntelliJ for that to expedite: https://www.jetbrains.com/help/idea/openrewrite.html#create-openrewrite-recipe . If everything goes well with a "recipe" for it could be a opportunity to open a PR for it. cc @timtebeek

---

From: "timtebeek (@timtebeek)" <[email-masked]>
Date: Wed, 04 Jun 2025 20:25:00 +0000

hi yes we recently added this best practices recipe for JSpecify, both to migrate away from a few existing ones, as well as to add in any potentially missing annotations:
https://github.com/openrewrite/rewrite-migrate-java/blob/a130cbbbe4fb70220755a2833100c746e390a5f0/src/main/resources/META-INF/rewrite/jspecify.yml#L17-L28

Hope that helps you there!