Class UserCachingComparator

java.lang.Object
com.atlassian.jira.issue.comparator.UserCachingComparator
All Implemented Interfaces:
Comparator<ApplicationUser>

@NotThreadSafe public class UserCachingComparator extends Object implements Comparator<ApplicationUser>
This comparator tries to compare two users based on their 'best name' ie their full name if possible, otherwise their username.

This comparator completely ignores case, using the specified locale to make sure that we correctly sort i18n characters. It uses locale-sensitive collation, which is very expensive in CPU time. To minimise the overhead of this, it caches the collation keys for users internally. See

invalid @link
{@link http://docs.oracle.com/javase/tutorial/i18n/text/perform.html
} for more information about collation keys and their performance implications.

WARNING: This class is NOT thread safe and caches information potentially about all users. You should not reuse instances of this class beyond the scope of a single servlet/rest/web request.

Since:
v6.2