Skip to content

Commit

Permalink
[JENKINS-19433] - Fixed comments from @jglick
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
  • Loading branch information
oleg-nenashev committed Feb 23, 2014
1 parent 0a8d52a commit fe2d408
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/hudson/tasks/MailAddressResolver.java
Expand Up @@ -133,7 +133,7 @@ public static String resolveFast(User u) {

// Try user properties
Mailer.UserProperty emailProperty = u.getProperty(Mailer.UserProperty.class);
if (emailProperty != null && emailProperty.hasExplicitlyConfiguredAddress()) {
if (emailProperty != null) {
String explicitAddress = emailProperty.getExplicitlyConfiguredAddress();
if (explicitAddress != null) // A final check to prevent concurrency issues
return explicitAddress;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/hudson/tasks/Mailer.java
Expand Up @@ -57,6 +57,7 @@
import java.util.logging.Logger;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
import javax.annotation.CheckForNull;
import javax.mail.Address;
import javax.mail.Authenticator;
import javax.mail.Message;
Expand Down Expand Up @@ -565,6 +566,7 @@ public String getConfiguredAddress() {
* @return A trimmed email address. It can be null
* @since TODO
*/
@CheckForNull
public String getExplicitlyConfiguredAddress() {
return Util.fixEmptyAndTrim(emailAddress);
}
Expand Down

0 comments on commit fe2d408

Please sign in to comment.