Skip to content
Permalink
Browse files
[JENKINS-25735] - Also check createValue(StaplerRequest) in MaskPassw…
…ordsConfig
  • Loading branch information
oleg-nenashev committed Nov 29, 2016
1 parent 8b71ffe commit 02fc70ae96ddacff8e3bb55307d8300d73cf7a88
Showing 1 changed file with 8 additions and 2 deletions.
@@ -197,7 +197,7 @@ public boolean isMasked(String paramValueClassName) {
maskPasswordsParamValueClasses = new LinkedHashSet<String>();

// The only way to find parameter definition/parameter value
// couples is to reflect the 3 methods of parameter definition
// couples is to reflect the methods of parameter definition
// classes which instantiate the parameter value.
// This means that this algorithm expects that the developers do
// clearly redefine the return type when implementing parameter
@@ -218,12 +218,18 @@ public boolean isMasked(String paramValueClassName) {
} catch(Exception e) {
LOGGER.log(Level.INFO, "No createValue(String) method for " + paramDefClass);
}
// ParameterDefinition.createValue(org.kohsuke.stapler.StaplerRequest, net.sf.json.JSONObjec)
// ParameterDefinition.createValue(org.kohsuke.stapler.StaplerRequest, net.sf.json.JSONObject)
try {
add(paramDefClass.getMethod("createValue", StaplerRequest.class, JSONObject.class));
} catch (Exception e) {
LOGGER.log(Level.INFO, "No createValue(StaplerRequest, JSONObject) method for " + paramDefClass);
}
// ParameterDefinition.createValue(org.kohsuke.stapler.StaplerRequest)
try {
add(paramDefClass.getMethod("createValue", StaplerRequest.class));
} catch (Exception e) {
LOGGER.log(Level.INFO, "No createValue(StaplerRequest) method for " + paramDefClass);
}
}};

//If this parameter actions respinds to any of these. Lets add it.

0 comments on commit 02fc70a

Please sign in to comment.