Skip to content

Commit

Permalink
JENKINS-51521: Default value for sortMode
Browse files Browse the repository at this point in the history
  • Loading branch information
klimas7 committed May 24, 2018
1 parent 2369bfe commit 0c75bbf
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -202,7 +202,7 @@ public void setBranch(String nameOfBranch) {
}

public SortMode getSortMode() {
return this.sortMode;
return this.sortMode == null ? SortMode.NONE : this.sortMode;
}

public void setSortMode(SortMode sortMode) {
Expand Down Expand Up @@ -557,7 +557,7 @@ public ArrayList<String> sortByName(Set<String> set) {

ArrayList<String> tags = new ArrayList<String>(set);

if (sortMode.getIsUsingSmartSort()) {
if (getSortMode().getIsUsingSmartSort()) {
Collections.sort(tags, new SmartNumberStringComparer());
} else {
Collections.sort(tags);
Expand Down

0 comments on commit 0c75bbf

Please sign in to comment.