SAMLMetadataSupport.getDescriptorExtensions has comments implying that its parameters are never null. However, if that contract is violated by the caller the method simply returns null, and the parameters are actually annotated as @Nullable.
I can't see a benefit to this approach; it makes more sense to simply annotate and enforce a @Nonnull constraint on both parameters.
SAMLMetadataSupport.getDescriptorExtensions
has comments implying that its parameters are nevernull
. However, if that contract is violated by the caller the method simply returnsnull
, and the parameters are actually annotated as@Nullable
.I can't see a benefit to this approach; it makes more sense to simply annotate and enforce a
@Nonnull
constraint on both parameters.