On Wed, 31 Jan 2024 13:04:07 GMT, Per Minborg <pminb...@openjdk.org> wrote:
> This PR proposes to implement `hashCode()` and `equals()` methods for > implementations of `PathElement`. > > In doing so, the previous `PathElementImpl` was removed and replaced in favor > of distinct `record` implementations, each reflecting its own path element > selection type. This also allowed the `PathKind` to be removed as this piece > of information is now carried in the sealed type hierarchy. > > It is worth noting, the implementations resides in the `jdk.internal` package > and consequently, they are not exposed to clients. So, we could use pattern > matching (for example) internally but not in client code. This pull request has now been integrated. Changeset: b58d73b9 Author: Per Minborg <pminb...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/b58d73b915bd1b26e741e9a6f12d029d21e11145 Stats: 189 lines in 4 files changed: 113 ins; 34 del; 42 mod 8323746: Add PathElement hashCode and equals Reviewed-by: mcimadamore ------------- PR: https://git.openjdk.org/jdk/pull/17651