Skip to content

Commit

Permalink
[JENKINS-25735] - Revert formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-nenashev committed Nov 29, 2016
1 parent 292a54d commit 8b71ffe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Expand Up @@ -65,7 +65,7 @@

/**
* Build wrapper that alters the console so that passwords don't get displayed.
*
*
* @author Romain Seguy (http://openromain.blogspot.com)
*/
public final class MaskPasswordsBuildWrapper extends SimpleBuildWrapper {
Expand Down Expand Up @@ -169,10 +169,10 @@ public void makeBuildVariables(AbstractBuild build, Map<String, String> variable
@Override
public void makeSensitiveBuildVariables(AbstractBuild build, Set<String> sensitiveVariables) {
final Map<String, String> variables = new TreeMap<String, String>();
makeBuildVariables(build, variables);
makeBuildVariables(build, variables);
sensitiveVariables.addAll(variables.keySet());
}

@Override
public void setUp(Context context, Run<?, ?> build, FilePath workspace, Launcher launcher, TaskListener listener, EnvVars initialEnvironment) throws IOException, InterruptedException {
// nothing to do here
Expand Down Expand Up @@ -241,7 +241,7 @@ public int hashCode() {

@Extension(ordinal = 1000) // JENKINS-12161
public static final class DescriptorImpl extends BuildWrapperDescriptor {

public DescriptorImpl() {
super(MaskPasswordsBuildWrapper.class);
}
Expand Down
Expand Up @@ -72,10 +72,10 @@ public class MaskPasswordsConfig {
/**
* Users can define name/password pairs at the global level to share common
* passwords with several jobs.
*
*
* <p>Never ever use this attribute directly: Use {@link #getGlobalVarPasswordPairsList} to avoid
* potential NPEs.</p>
*
*
* @since 2.7
*/
private List<VarPasswordPair> globalVarPasswordPairs;
Expand All @@ -90,10 +90,10 @@ public MaskPasswordsConfig() {

/**
* Adds a name/password pair at the global level.
*
*
* <p>If either name or password is blank (as defined per the Commons Lang
* library), then the pair is not added.</p>
*
*
* @since 2.7
*/
public void addGlobalVarPasswordPair(VarPasswordPair varPasswordPair) {
Expand Down Expand Up @@ -131,29 +131,29 @@ private static XmlFile getConfigFile() {

/**
* Returns the list of name/password pairs defined at the global level.
*
*
* <p>Modifications broughts to the returned list has no impact on this
* configuration (the returned value is a copy). Also, the list can be
* empty but never {@code null}.</p>
*
*
* @since 2.7
*/
public List<VarPasswordPair> getGlobalVarPasswordPairs() {
List<VarPasswordPair> r = new ArrayList<VarPasswordPair>(getGlobalVarPasswordPairsList().size());

// deep copy
for(VarPasswordPair varPasswordPair: getGlobalVarPasswordPairsList()) {
r.add((VarPasswordPair) varPasswordPair.clone());
}

return r;
}

/**
* Fixes JENKINS-11514: When {@code MaskPasswordsConfig.xml} is there but was created from
* version 2.6.1 (or older) of the plugin, {@link #globalVarPasswordPairs} can actually be
* {@code null} ==> Always use this getter to avoid NPEs.
*
*
* @since 2.7.1
*/
private List<VarPasswordPair> getGlobalVarPasswordPairsList() {
Expand Down

0 comments on commit 8b71ffe

Please sign in to comment.