Example #1
0
  /**
   * Gets a message from the resource bundle.
   *
   * @return null if no found
   */
  private static final String getFromBundle(int code, Locale locale) {
    final BundleInfo bi = Aide.getBundleInfo(code);
    final PropertyBundle rb = // case insensitive
        PropertyBundle.getBundle(bi.filename, locale, true);
    if (rb != null) return rb.getProperty(Integer.toHexString(code - getType(code)));

    throw new IllegalStateException("Missing resource: " + bi + " locale=" + locale);
  }