ConfigMe icon indicating copy to clipboard operation
ConfigMe copied to clipboard

Nullability annotations continued: think of alternatives

Open ljacqu opened this issue 2 years ago • 2 comments

Unfortunately, @NotNull clutters the code and especially array/varargs and makes it more difficult to follow the code. In this issue, we want to think about a long-term solution for this, such as:

  • keep it as it is
  • see if we can default params to be not-null (I think that's not possible -> need to make sure Kotlin picks up on it)
  • migrate the project to Kotlin?
  • Introduce a Kotlin facade?
  • keep the notnull annotations only on API classes

ljacqu avatar Jun 20 '23 16:06 ljacqu

This is interesting: https://github.com/google/guava/blob/master/guava/src/com/google/common/base/ElementTypesAreNonnullByDefault.java

ljacqu avatar Aug 29 '23 12:08 ljacqu

#450 Jetbrains annotations in 26.0.0:

Added new experimental annotation: @NotNullByDefault

ljacqu avatar Oct 09 '24 05:10 ljacqu