Skip to content

Commit

Permalink
[FIXED JENKINS-9702] Misuse of hudson.Util.fixEmptyAndTrim was causin…
Browse files Browse the repository at this point in the history
…g NPEs.
  • Loading branch information
abayer committed May 16, 2011
1 parent d6dc41c commit 89e610b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/hudson/plugins/git/GitSCM.java
Expand Up @@ -403,7 +403,7 @@ public String getGitConfigEmail() {
public String getGitConfigNameToUse() {
String confName;
String globalConfigName = ((DescriptorImpl) getDescriptor()).getGlobalConfigName();
if ((globalConfigName != null) && (gitConfigName == null) && (!fixEmptyAndTrim(globalConfigName).equals(""))) {
if ((fixEmptyAndTrim(globalConfigName) != null) && (gitConfigName == null)) {
confName = globalConfigName;
} else {
confName = gitConfigName;
Expand All @@ -415,7 +415,7 @@ public String getGitConfigNameToUse() {
public String getGitConfigEmailToUse() {
String confEmail;
String globalConfigEmail = ((DescriptorImpl) getDescriptor()).getGlobalConfigEmail();
if ((globalConfigEmail != null) && (gitConfigEmail == null) && (!fixEmptyAndTrim(globalConfigEmail).equals(""))) {
if ((fixEmptyAndTrim(globalConfigEmail) != null) && (gitConfigEmail == null)) {
confEmail = globalConfigEmail;
} else {
confEmail = gitConfigEmail;
Expand Down

0 comments on commit 89e610b

Please sign in to comment.