public static void applyResourcePatterns(String extensionString, final CompilerConfigurationImpl configuration)
    throws ConfigurationException {
    StringTokenizer tokenizer = new StringTokenizer(extensionString, ";", false);
    List<String[]> errors = new ArrayList<>();

    while (tokenizer.hasMoreTokens()) {
      String namePattern = tokenizer.nextToken();
      try {
        configuration.addResourceFilePattern(namePattern);
      }
      catch (MalformedPatternException e) {
        errors.add(new String[]{namePattern, e.getLocalizedMessage()});
      }
    }

    if (!errors.isEmpty()) {
      final StringBuilder patternsWithError = new StringBuilder();
      for (final Object error : errors) {
        String[] pair = (String[])error;
        patternsWithError.append("\n");
        patternsWithError.append(pair[0]);
        patternsWithError.append(": ");
        patternsWithError.append(pair[1]);
      }

      throw new ConfigurationException(
        JavaCompilerBundle.message("error.compiler.configurable.malformed.patterns", patternsWithError.toString()),
        JavaCompilerBundle.message("bad.resource.patterns.dialog.title")
      );
    }
  }
public static void applyResourcePatterns(String extensionString, final CompilerConfigurationImpl configuration)