docs: public ResourceBundle getResourceBundle(Class<?> aClass, String bundleName, Locale locale) {
          ResourceBundle bundle = null;
          ClassLoader classLoader = null;
  
          if (bundleName == null) // instead of waiting for ResourceBundle to
                                  // throw the NPE, do it now
              throw new NullPointerException("Unable to load resource bundle: null bundleName");
  
          if (locale == null)
              locale = Locale.getDefault();
  
          // TODO: add resource bundle cache.. ?
  
          // yikes! TRY to figure out the class from the callstack--
          // have to do this every time aClass is null coming in, which is
          // definitely not optimal, but at least makes sure the resource bundle
          // is loaded from the right place
          if (aClass == null) {
              if (finder == null)
                  finder = StackFinder.getInstance();
  
              if (finder != null)
                  aClass = finder.getCaller();
          }
  
          if (aClass != null) {
              // If aClass is NOT null (it was passed in, or we found it),
              // use its classloader first to try loading the resource bundle
              try {
                  classLoader = aClass.getClassLoader();
                  bundle = ResourceBundle.getBundle(bundleName, locale, classLoader);
              } catch (RuntimeException re) {
                  logEvent("Unable to load {0} from {1} (from class {2}) in {3}; caught exception: {4}", new Object[] { bundleName, classLoader, aClass, locale, re });
              }
          }
  
          if (bundle == null) {
              // If the bundle wasn't found using the class' classloader,
              // try the default classloader (in OSGi, will be in the RAS
              // bundle..)
              try {
                  bundle = ResourceBundle.getBundle(bundleName, locale);
              } catch (RuntimeException re) {
                  logEvent("Unable to load {0} from {1} in {2}; caught exception: {3}", new Object[] { bundleName, classLoader, locale, re });
  
                  try {
                      // Try the context classloader
                      classLoader = (ClassLoader) AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
                          public Object run() throws Exception {
                              return Thread.currentThread().getContextClassLoader();
                          }
                      });
  
                      bundle = ResourceBundle.getBundle(bundleName, locale, classLoader);
                  } catch (PrivilegedActionException pae) {
                      logEvent("Unable to load {0} from {1} in {2}; caught exception: {3}", new Object[] { bundleName, classLoader, locale, pae });
                      throw new RuntimeException("Unable to get context classloader", pae);
                  }
              }
          }
  
          return bundle;
      }