diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/AntTask.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/AntTask.groovy index 7cd9b5b91a7..b713c00ed8d 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/AntTask.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/AntTask.groovy @@ -51,13 +51,13 @@ public class AntTask extends DefaultTask { // remove existing loggers, we add our own List toRemove = new ArrayList<>(); - for (BuildListener l : ant.project.getBuildListeners()) { + for (BuildListener listener : ant.project.getBuildListeners()) { if (l instanceof BuildLogger) { - toRemove.add(l); + toRemove.add(listener); } } - for (BuildLogger l : toRemove) { - ant.project.removeBuildListener(l) + for (BuildLogger listener : toRemove) { + ant.project.removeBuildListener(listener) } final int outputLevel = logger.isDebugEnabled() ? Project.MSG_DEBUG : (logger.isInfoEnabled() ? Project.MSG_INFO : Project.MSG_WARN) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/ThirdPartyAuditTask.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/ThirdPartyAuditTask.groovy index 69db1e773e8..2ee4c29d614 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/ThirdPartyAuditTask.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/ThirdPartyAuditTask.groovy @@ -167,7 +167,7 @@ public class ThirdPartyAuditTask extends AntTask { /** * check for sheisty classes: if they also exist in the extensions classloader, its jar hell with the jdk! */ - protected void checkSheistyClasses(Path root, Set excluded) { + private void checkSheistyClasses(Path root, Set excluded) { // system.parent = extensions loader. // note: for jigsaw, this evilness will need modifications (e.g. use jrt filesystem!). // but groovy/gradle needs to work at all first!