My IDE is complaining that I'm passing a null Locale
value to:
String getMessage(String code, @Nullable Object[] args, Locale locale) throws NoSuchMessageException;
Which obviously does not have @Nullable
, but the implementation definitely accepts null
and uses the default Locale
, which is what we want and have been doing with Spring 5.x.
And, in fact, AbstractMessageSource.getMessageInternal
does have @Nullable
:
protected String getMessageInternal(@Nullable String code, @Nullable Object[] args, @Nullable Locale locale) {