code: URL getResource(String name) throws MalformedURLException {
          if (resourcePaths!=null)
              return resourcePaths.get(name);
          else
              return context.getResource(name);
      }
docs: /*package