@Test public void testMissingResource() throws Exception { try { messages.getMessage("no-such-code"); } catch (ResourceNotFoundException e) { } }
@Override public String getMessage(final String code) { checkNotNull(code); for (ResourceBundle bundle : bundles) { try { return bundle.getString(code); } catch (MissingResourceException e) { log.trace(e.toString(), e); } } throw new ResourceNotFoundException(code); }
ResourceBundleMessageSource extends ComponentSupport implements MessageSource { @Override public String getMessage(final String code) { checkNotNull(code); for (ResourceBundle bundle : bundles) { try { return bundle.getString(code); } catch (MissingResourceException e) { log.trace(e.toString(), e); } } throw new ResourceNotFoundException(code); } }
ResourceBundleMessageSource extends ComponentSupport implements MessageSource { @Override public String getMessage(final String code) { checkNotNull(code); for (ResourceBundle bundle : bundles) { try { return bundle.getString(code); } catch (MissingResourceException e) { log.trace(e.toString(), e); } } throw new ResourceNotFoundException(code); } ResourceBundleMessageSource(final Locale locale);  ResourceBundleMessageSource(final Class... types); }
ResourceBundleMessageSource extends ComponentSupport implements MessageSource { @Override public String getMessage(final String code) { checkNotNull(code); for (ResourceBundle bundle : bundles) { try { return bundle.getString(code); } catch (MissingResourceException e) { log.trace(e.toString(), e); } } throw new ResourceNotFoundException(code); } ResourceBundleMessageSource(final Locale locale);  ResourceBundleMessageSource(final Class... types); Locale getLocale(); ResourceBundleMessageSource add(final boolean required, final Class... types); ResourceBundleMessageSource add(final Class... types); @Override String getMessage(final String code); @Override String getMessage(final String code, final String defaultValue); @Override String format(final String code, final @Nullable Object... args); }
ResourceBundleMessageSource extends ComponentSupport implements MessageSource { @Override public String getMessage(final String code) { checkNotNull(code); for (ResourceBundle bundle : bundles) { try { return bundle.getString(code); } catch (MissingResourceException e) { log.trace(e.toString(), e); } } throw new ResourceNotFoundException(code); } ResourceBundleMessageSource(final Locale locale);  ResourceBundleMessageSource(final Class... types); Locale getLocale(); ResourceBundleMessageSource add(final boolean required, final Class... types); ResourceBundleMessageSource add(final Class... types); @Override String getMessage(final String code); @Override String getMessage(final String code, final String defaultValue); @Override String format(final String code, final @Nullable Object... args);  }