Can we deprecate Path.endsWith(String)?

David Alayachew davidalayachew at gmail.com
Mon Nov 3 00:28:00 UTC 2025


Ty vm. Looks great. Hope to see that change come back soon!

If there is anything I can do to help it come out faster, please let me
know! I am perfectly happy to write the implementation. And since we have
the Bug Number, couldn't I just submit my PR under that? Lmk, I could do it
right now!

I'm excited since this is an implementation that I could actually do by
myself.

One thing that stood out to me is that, in the unit test, I saw that "." is
considered as no extension, but ".." is considered to be an empty
extension. Wouldn't that break Path's that are built out of ".." and "."?
For example, if I submit a Path as Path.of(".."), then by definition, that
is a directory, and thus, should be considered no extension.

I propose that "." and ".." be considered no extension.

On Sun, Nov 2, 2025 at 7:03 PM Pavel Rappo <pavel.rappo at gmail.com> wrote:

> On Sun, Nov 2, 2025 at 11:36 PM David Alayachew
> <davidalayachew at gmail.com> wrote:
> >
> > <snip>
> >
> > I only see the commit hash, I don't know how to look that up.
> >
>
> Each commit (but a few initial) in openjdk/jdk has a commit message.
> That message starts with an issue number. That number can be used to
> look up the issue in JBS: https://bugs.openjdk.org/. The issue has a
> summary, comments, and links to GitHub's commit and PR pages.
>
> Here are the links for 10356e767a44632c5de142d4666bd85d4618bf71
>
>  - https://bugs.openjdk.org/browse/JDK-8298303
>  -
> https://github.com/openjdk/jdk/commit/10356e767a44632c5de142d4666bd85d4618bf71
>  - https://github.com/openjdk/jdk/pull/11566
>
> -Pavel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20251102/2dd72235/attachment-0001.htm>


More information about the core-libs-dev mailing list