Skip to content
Browse files
Fix JENKINS-18912
Created new list to hold the macros instead of using that returned by all(). If we use the one returned by all(), then all the private macros get added to the ExtensionList for TokenMacro!
  • Loading branch information
slide committed Oct 28, 2013
1 parent 7eca143 commit 95b946e160434368fb381031af1879d246520580
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/main/java/org/jenkinsci/plugins/tokenmacro/
@@ -34,6 +34,7 @@

import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -158,8 +159,8 @@ public static String expand(AbstractBuild<?,?> context, TaskListener listener, S
if ( StringUtils.isBlank( stringWithMacro ) ) return stringWithMacro;
StringBuffer sb = new StringBuffer();
Tokenizer tokenizer = new Tokenizer(stringWithMacro);

ExtensionList<TokenMacro> all = all();
List<TokenMacro> all = new ArrayList<TokenMacro>(all());
if(privateTokens!=null) {
all.addAll( privateTokens );

1 comment on commit 95b946e


This comment has been minimized.

Copy link

@oleg-nenashev oleg-nenashev commented on 95b946e Oct 28, 2013


Please sign in to comment.