On Tue, 6 Oct 2026 19:25:33 GMT, Volkan Yazici <[email protected]> wrote:
> Fix port comparison in `java.net.URI::compareTo` and increase the test > coverage. > > `open/test/jdk/java/net/URI/Test.java` is improved in following aspects: > > - Old `gt(u, v)` was delegating to `lt(v, u)`. This left `u.compareTo(v) > 0` > path unchecked. > - `eqHashCompUni(u, v)` is introduced to verify all `equals()`, `hashCode()`, > `compareTo()` contracts. > - `eqHashCompBid(u, v)` is introduced to verify `eqHashCompUni(u, v)` > bidirectionally. > > --------- > - [X] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). This pull request has now been integrated. Changeset: 9b2f3810 Author: Volkan Yazici <[email protected]> URL: https://git.openjdk.org/jdk/commit/9b2f38106b2d3202bc7ca2ae2220aac02c49607a Stats: 226 lines in 2 files changed: 105 ins; 67 del; 54 mod 8393499: URI.compareTo doesn't follow Comparable.compareTo contract Reviewed-by: dfuchs ------------- PR: https://git.openjdk.org/jdk/pull/33232
