Skip to content

Commit

Permalink
[FIXED JENKINS-28419] - Support the reset of JenkinsLocationConfigura…
Browse files Browse the repository at this point in the history
…tion::adminAddress
  • Loading branch information
oleg-nenashev committed May 16, 2015
1 parent dab392f commit 17116a2
Showing 1 changed file with 9 additions and 4 deletions.
Expand Up @@ -85,13 +85,18 @@ public synchronized void load() {
return v;
}

public void setAdminAddress(@Nonnull String adminAddress) {
if(adminAddress.startsWith("\"") && adminAddress.endsWith("\"")) {
/**
* Sets the e-mail address of Jenkins administrator.
* @param adminAddress Admin address. Use null to reset the value to default.
*/
public void setAdminAddress(@CheckForNull String adminAddress) {
String address = Util.nullify(adminAddress);
if(address != null && address.startsWith("\"") && address.endsWith("\"")) {
// some users apparently quote the whole thing. Don't konw why
// anyone does this, but it's a machine's job to forgive human mistake
adminAddress = adminAddress.substring(1,adminAddress.length()-1);
address = address.substring(1,address.length()-1);
}
this.adminAddress = adminAddress;
this.adminAddress = address;
save();
}

Expand Down

0 comments on commit 17116a2

Please sign in to comment.