Skip to content

Commit

Permalink
Pre commit changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sboardwell committed Jan 23, 2024
1 parent fb8b4e6 commit f826b75
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import hudson.model.User;
import hudson.tasks.Mailer;

/**
/**
* User data forwarded by the reverse proxy
* **/
public class ForwardedUserData {
Expand All @@ -27,7 +27,7 @@ public void setDisplayName(String displayName) {
this.displayName = displayName;
}

/**
/**
* Update the forwarded data to the jenkins user.
* @return true if updated and saved
* **/
Expand Down Expand Up @@ -58,7 +58,7 @@ private boolean updateEmail(User user){
boolean toReturn = false;
if(isNotNullHeader(email)){
Mailer.UserProperty emailProp = user.getProperty(Mailer.UserProperty.class);
if (emailProp == null || !email.equals(emailProp.getConfiguredAddress())) {
if (emailProp == null || !email.equals(emailProp.getConfiguredAddress())) {
emailProp = new Mailer.UserProperty(email);
try {
user.addProperty(emailProp);
Expand All @@ -75,4 +75,4 @@ private static boolean isNotNullHeader(String value){
return value != null && !value.equals(NULL_HEADER);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ public void testUpdate() {
Mailer.UserProperty emailProp = user.getProperty(Mailer.UserProperty.class);
Assert.assertEquals("[email protected]", emailProp.getAddress());
}
}
}

0 comments on commit f826b75

Please sign in to comment.