docs: public static Collection<String> listResources(ClassLoader classLoader, String rootPath, Predicate<String> predicate) {
      String jarPath = null;
      JarFile jar = null;
      try {
        Collection<String> paths = new ArrayList<>();
        URL root = classLoader.getResource(rootPath);
        if (root != null) {
          checkJarFile(root);
  
          // Path of the root directory
          // Examples :
          // org/sonar/sqale/index.txt -> rootDirectory is org/sonar/sqale
          // org/sonar/sqale/ -> rootDirectory is org/sonar/sqale
          // org/sonar/sqale -> rootDirectory is org/sonar/sqale
          String rootDirectory = rootPath;
          if (StringUtils.substringAfterLast(rootPath, "/").indexOf('.') >= 0) {
            rootDirectory = StringUtils.substringBeforeLast(rootPath, "/");
          }
          // strip out only the JAR file
          jarPath = root.getPath().substring(5, root.getPath().indexOf('!'));
          jar = new JarFile(URLDecoder.decode(jarPath, UTF_8.name()));
          Enumeration<JarEntry> entries = jar.entries();
          while (entries.hasMoreElements()) {
            String name = entries.nextElement().getName();
            if (name.startsWith(rootDirectory) && predicate.test(name)) {
              paths.add(name);
            }
          }
        }
        return paths;
      } catch (Exception e) {
        throw Throwables.propagate(e);
      } finally {
        closeJar(jar, jarPath);
      }
    }