Repository: groovy Updated Branches: refs/heads/GROOVY_2_4_X 036c14fa0 -> 4f989414a
GROOVY-7833: let grape ignore runner lines with hash to enable comments. When getting a groovy jar via grab, there will be a TestNG runner configuration in the jar. This configuration contains the Apache License 2 text, as required by the foundation. The code expected the class only. With this change the comments will be ignored. Project: http://git-wip-us.apache.org/repos/asf/groovy/repo Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/25362dd4 Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/25362dd4 Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/25362dd4 Branch: refs/heads/GROOVY_2_4_X Commit: 25362dd47e2552cc3b714fa1284449b12226f931 Parents: 036c14f Author: Jochen Theodorou <[email protected]> Authored: Sat May 7 10:44:22 2016 +0200 Committer: paulk <[email protected]> Committed: Fri Jun 3 14:58:57 2016 +1000 ---------------------------------------------------------------------- src/main/groovy/grape/GrapeIvy.groovy | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/groovy/blob/25362dd4/src/main/groovy/grape/GrapeIvy.groovy ---------------------------------------------------------------------- diff --git a/src/main/groovy/grape/GrapeIvy.groovy b/src/main/groovy/grape/GrapeIvy.groovy index d5ada65..10300c6 100644 --- a/src/main/groovy/grape/GrapeIvy.groovy +++ b/src/main/groovy/grape/GrapeIvy.groovy @@ -338,7 +338,10 @@ class GrapeIvy implements GrapeEngine { void processRunners(InputStream is, String name, ClassLoader loader) { is.text.readLines().each { - GroovySystem.RUNNER_REGISTRY[name] = loader.loadClass(it.trim()).newInstance() + def line = it.trim() + if (!line.startsWith("#")) { + GroovySystem.RUNNER_REGISTRY[name] = loader.loadClass(line).newInstance() + } } }
