[maven-jenkins-env] branch master updated: Other attempt due to 'Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods toUnique java.lang.Iterable groovy.lang.Closure.'

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[maven-jenkins-env] branch master updated: Other attempt due to 'Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods toUnique java.lang.Iterable groovy.lang.Closure.'

Robert Scholte-8
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-jenkins-env.git


The following commit(s) were added to refs/heads/master by this push:
     new ed42cea  Other attempt due to 'Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods toUnique java.lang.Iterable groovy.lang.Closure.'
ed42cea is described below

commit ed42ceaad3d3eb0290855c7c5f4aec8549d4c262
Author: rfscholte <[hidden email]>
AuthorDate: Sat Sep 14 18:42:29 2019 +0200

    Other attempt due to 'Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods toUnique java.lang.Iterable groovy.lang.Closure.'
---
 vars/jenkinsNotify.groovy | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vars/jenkinsNotify.groovy b/vars/jenkinsNotify.groovy
index 5453342..37f056d 100644
--- a/vars/jenkinsNotify.groovy
+++ b/vars/jenkinsNotify.groovy
@@ -94,7 +94,7 @@ def call(Map params = [:]) {
     } else {
         messageBody = messageBody + "\n\nChanges:\n";
         for (def changeSet in currentBuild.changeSets) {
-            for (def change in changeSet.toUnique{ a, b -> a.commitId <=> b.commitId }) {
+            for (def change in changeSet.unique{ a, b -> a.commitId <=> b.commitId }) {
                 messageBody = messageBody + "\n* ${change.msg.trim().replaceAll('\n','\n  ')}"
                 authors += change.author.id
             }