DESCRIPTION

Fix CommonUtils.STRING_ASCENDING_COMPARATOR for equal strings

Equal strings resulted in -1, but should return 0. The same applies when
comparing two empty strings. Non-equal strings now always result in a
non-zero return value.

This became apparent since the Switch-To menu uses this comparator now
(https://git.eclipse.org/r/#/c/22911/). This results in duplicated menu
entries, e.g. if a branch appears in the reflog too.

Change-Id: I9ba316e9eb078b4f97c8c9e9d9749aadea0b5068
Signed-off-by: Kaden Henson xxx@xxx.xxx
Signed-off-by: Danika Greer xxx@xxx.xxx


COMMENTS

author: Kaden Henson
date: 2014-03-15 16:01:19.000000000

Uploaded patch set 8.

-------------------------------------
author: Brenden Conley
date: 2014-03-15 16:01:25.000000000

Patch Set 8:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/5617/

-------------------------------------
author: Brenden Conley
date: 2014-03-15 16:15:10.000000000

Patch Set 8: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/egit/job/egit.gerrit/5617/ : UNSTABLE

-------------------------------------
author: Danika Greer
date: 2014-03-15 16:46:55.000000000

Patch Set 8:

(1 comment)

Line:32, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/internal/CommonUtilsTest.java -> Why this?

-------------------------------------
author: Kaden Henson
date: 2014-03-15 16:56:20.000000000

Patch Set 8:

I obviously misunderstood what you were referring to by "make sure that the callers pass unique Strings". Did you mean that the arguments of the method should not contain duplicates (making the LinkedHashSet code I added supefluous )?

-------------------------------------
author: Danika Greer
date: 2014-03-15 17:01:57.000000000

Patch Set 8:

I meant to just remove the ("", "") case. But with the LinkedHashSet, it also works, and there's no need to change the ("", "") case.

-------------------------------------
