private void addWarnings(ErrorCollector errorCollector) {
    for (int i = 0; i < errorCollector.getWarningCount(); i++) {
      WarningMessage warning = errorCollector.getWarning(i);
      collector.add(new GroovyCompilerMessage(
        GroovyCompilerMessageCategories.WARNING, warning.getMessage(),
        null, -1, -1
      ));
    }
  }
private void addWarnings(ErrorCollector errorCollector)