7065228: To interpret case-insensitive string locale independently

Reviewed-by: dfuchs, naoto, djelinski, jpai, michaelm
This commit is contained in:
Darragh Clarke 2023-05-22 10:53:59 +00:00 committed by Jaikiran Pai
parent a9705196ce
commit 05e99db466
20 changed files with 74 additions and 60 deletions

View file

@ -30,6 +30,7 @@ import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.ObjectStreamException;
import java.io.ObjectStreamField;
import java.util.Locale;
/**
*
@ -137,7 +138,7 @@ public class InetSocketAddress
if (addr != null)
return addr.hashCode() + port;
if (hostname != null)
return hostname.toLowerCase().hashCode() + port;
return hostname.toLowerCase(Locale.ROOT).hashCode() + port;
return port;
}
}