Sort hashtags alphabetically in ChangeNotes
Change-Id: Ifa85623b80ef4f36d4c0dd288e5d3b3fea2d522f
This commit is contained in:
@@ -40,6 +40,6 @@ public class GetHashtags implements RestReadView<ChangeResource> {
|
|||||||
if (hashtags == null) {
|
if (hashtags == null) {
|
||||||
hashtags = Collections.emptySet();
|
hashtags = Collections.emptySet();
|
||||||
}
|
}
|
||||||
return Response.ok(new TreeSet<String>(hashtags));
|
return Response.ok(hashtags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import com.google.common.collect.ImmutableList;
|
|||||||
import com.google.common.collect.ImmutableListMultimap;
|
import com.google.common.collect.ImmutableListMultimap;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
import com.google.common.collect.ImmutableSetMultimap;
|
import com.google.common.collect.ImmutableSetMultimap;
|
||||||
|
import com.google.common.collect.ImmutableSortedSet;
|
||||||
import com.google.common.collect.Ordering;
|
import com.google.common.collect.Ordering;
|
||||||
import com.google.common.collect.Table;
|
import com.google.common.collect.Table;
|
||||||
import com.google.common.primitives.Ints;
|
import com.google.common.primitives.Ints;
|
||||||
@@ -165,8 +166,12 @@ public class ChangeNotes extends AbstractChangeNotes<ChangeNotes> {
|
|||||||
return reviewers;
|
return reviewers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return a ImmutableSet of all hashtags for this change sorted in alphabetical order.
|
||||||
|
*/
|
||||||
public ImmutableSet<String> getHashtags() {
|
public ImmutableSet<String> getHashtags() {
|
||||||
return hashtags;
|
return ImmutableSortedSet.copyOf(hashtags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user