RFR [15] 5064980: URI compareTo inconsistent with equals for mixed-case escape sequences
Daniel Fuchs
daniel.fuchs at oracle.com
Fri Dec 13 18:44:21 UTC 2019
Hi Kiran,
1926 int sn = s.length();
1927 int tn = t.length();
could be moved before line 1921 which could then become:
if (testForEquality && sn != tn) return sn - tn;
Otherwise looks good.
best regards,
-- daniel
On 13/12/2019 19:28, Kiran Ravikumar wrote:
> Hi Guys,
>
>
> Could someone please review my fix to URI.java class were
> URI.compareTo(URI) behavior was different to URI.equals(URI).
> |URI.compareTo|(URI) does not consider two URI's to be equal when they
> differ only in the case of hexadecimal digits of escaped octets, while
> |URI.equals(URI)|does consider such URIs to be equal.
>
> The fix involves spec and code change. A CSR was filed and approved.
>
> Please find the webrev at -
>
>
> http://cr.openjdk.java.net/~kravikumar/5064980/webrev.0/
>
>
> JBS: https://bugs.openjdk.java.net/browse/JDK-5064980
>
> Corresponding test is also updated to verify the behavior.
>
>
> Thanks,
>
> Kiran
>
More information about the net-dev
mailing list