pass in Locale

toLowerCase would act differently in Turkey.
This commit is contained in:
Eugene Yokota 2019-08-27 17:51:19 -04:00
parent c5ce636376
commit 5480646715
1 changed files with 6 additions and 4 deletions

View File

@ -4,6 +4,7 @@ import sbt.librarymanagement.VersionNumber
import sbt.internal.librarymanagement.SemSelOperator.{ Lt, Lte, Gt, Gte, Eq }
import scala.annotation.tailrec
import java.util.Locale
private[librarymanagement] abstract class SemSelAndChunkFunctions {
protected def parse(andClauseToken: String): SemSelAndChunk = {
@ -126,7 +127,8 @@ private[librarymanagement] abstract class SemComparatorExtra {
case (true, true) => implicitly[Ordering[Long]].compare(ts1head.toLong, ts2head.toLong)
case (false, true) => 1
case (true, false) => -1
case (false, false) => ts1head.toLowerCase.compareTo(ts2head.toLowerCase)
case (false, false) =>
ts1head.toLowerCase(Locale.ENGLISH).compareTo(ts2head.toLowerCase(Locale.ENGLISH))
}
if (cmp == 0) compareTags(ts1.tail, ts2.tail)
else cmp