bitcoinj / bitcoinj

A library for working with Bitcoin
https://bitcoinj.org
Apache License 2.0
4.97k stars 2.48k forks source link

Consider migrating to JSpecify nullability annotations #3106

Open msgilligan opened 1 year ago

msgilligan commented 1 year ago

It looks like the major players in the JDK ecosystem are finally converging on a standard for nullability annotations.

See:

We need to keep an eye on this project and on the various tools that are migrating to it and then decide on which release (if any) we should migrate.

I'm going to mark this as "for consideration" in the 0.18 release, so we don't forget, but we can chose to postpone it if the tools aren't ready at that time.

msgilligan commented 2 months ago

JSpecify 1.0.0 is final! See https://jspecify.dev/blog/release-1.0.0/ Note also that Kotlin will fully support it in Kotlin 2.0.20 (which is in RC status) and Kotlin 2.1.0 will switch the default from warnings to errors for JSpecify nullability issues.

IMO, we should definitely migrate to it for the 0.18 milestone.

msgilligan commented 2 months ago

We have merged JSpecify support into secp256k1-jdk: https://github.com/bitcoinj/secp256k1-jdk/pull/64