use of io.micronaut.context.MessageSource in project micronaut-core by micronaut-projects.
the class CompositeMessageSource method getRawMessage.
@NonNull
@Override
public Optional<String> getRawMessage(@NonNull String code, @NonNull MessageContext context) {
ArgumentUtils.requireNonNull("code", code);
ArgumentUtils.requireNonNull("context", context);
for (MessageSource messageSource : messageSources) {
final Optional<String> message = messageSource.getRawMessage(code, context);
if (message.isPresent()) {
return message;
}
}
return Optional.empty();
}
Aggregations