add a deprecated Nonnull

30 views
Skip to first unread message

Caleb Cushing

unread,
Feb 29, 2024, 10:10:14 AMFeb 29
to jspecify-discuss
so, for convenience of people migrating from findbugs and jakarta (and maybe something else), it might be good to add a Nonnull annotation as well as the NonNull. I prefer the latter, but I was doing a migration on a small, and new library this morning and encountered this. I'd mark it as deprecated letting people know they should move, but it makes starting the process faster.

Just a thought, this isn't *that* important to me.

Chris Povirk

unread,
Mar 15, 2024, 1:47:53 PMMar 15
to Caleb Cushing, jspecify-discuss
Sorry for burying this message.

I don't know that we'd talked about providing multiple names. My guess is that it ultimately won't be worth it: Some users will see a deprecated "Nonnull" annotation and assume (without reading the docs) that we don't have an annotation for that purpose at all; others will pick the wrong autocompletion by accident.

We do have work in front of us to simplify migration from one set of annotations to another. We put together some similar migration tooling for the specific purpose of adapting the Checker Framework's annotated JDK to our requirements, and we have some other tooling inside Google for other migrations that we've performed. None of that is "ready," but it makes me confident that we can someday provide an experience in which users type `java jspecify-migration.jar` and then receive a set of changes that includes renames, import changes, and changes to annotation position if they're migrating from declaration annotations. If I'm right, then the naming will be one of the smaller obstacles to migration.
Reply all
Reply to author
Forward
0 new messages