code: private synchronized Resource[] internalGet(String pattern) {
          Resource[] resources = cache.get(pattern);
  
          if (resources != null) {
              return resources;
          }
  
          try {
              resources = resolver.getResources(pattern);
          } catch (IOException e) {
              throw MiscUtil.toUnchecked(e);
          }
  
          if (resources == null) {
              resources = new Resource[0];
          } else {
              Arrays.sort(resources, resourceComparator);
          }
  
          cache.put(pattern, resources);
          return resources;
      }
docs: Use application context to enumerate resources. This call is thread safe.
  
  @param pattern Pattern to be used to lookup resources.
  @return An array of matching resources, sorted alphabetically by file name.