Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 95b946e
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -34,6 +34,7 @@

import java.io.IOException;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -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 );
}
Expand Down

1 comment on commit 95b946e

@oleg-nenashev
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.