Skip to content
Permalink
Browse files
[JENKINS-25735] - Revert formatting changes
  • Loading branch information
oleg-nenashev committed Nov 29, 2016
1 parent 292a54d commit 8b71ffee601454228fe3e4d7cedc02db34e9c920
Showing 2 changed files with 13 additions and 13 deletions.
@@ -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 {
@@ -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
@@ -241,7 +241,7 @@ public int hashCode() {

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

public DescriptorImpl() {
super(MaskPasswordsBuildWrapper.class);
}
@@ -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;
@@ -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) {
@@ -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() {

0 comments on commit 8b71ffe

Please sign in to comment.