Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There is widespread use of code-contract annotations across the API, particularly @Nullable / @Nonnull indicators on parameters or return values. We strive to make these accurate and we consider these annotations a formal part of the API; that is, changing a method from one that allows null parameters to one that does not would be a change, but a compatible one. Similarly, changing a method from one that may not return a null to one that may would also be a considered an incompatible change.

Some methods do check their parameters, but any parameter annotated as non-null signifies that its method is free to throw a runtime exception on null input.

In contrast to the above, we do not make essentially any use of true runtime annotations to handle configuration of components by Spring, and strongly discourage this technique. There are a small number of exceptions, such as the @Duration annotation supporting Spring conversion of XML duration syntax into milliseconds, which we do encourage the use ofbut we are phasing that out in V4.

Components, Initialization, and Destruction

...