Can we deprecate Path.endsWith(String)?
Brian Burkhalter
brian.burkhalter at oracle.com
Thu Jan 8 01:02:30 UTC 2026
Thanks for the useful comments.
On Jan 7, 2026, at 4:32 PM, John Rose <john.r.rose at oracle.com> wrote:
Maybe that is the way to go: just deprecating Path.{ends,starts}With(String) and nothing else.
$0.01 more – I’m OK with that, as long as the javadoc teaches
the toString technique in some discoverable manner. And not just
via the deprecated methods…?
On Jan 7, 2026, at 4:36 PM, Stuart Marks <stuart.marks at oracle.com> wrote:
So, maybe do (1) and (2) but omit (3). This boils down to just deprecating endsWith(String) and startsWith(String).
We have had a bit of a race condition in this discussion, but at least there appears to be some agreement that deprecation alone (with some javadoc enhancement) is a good way to go.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/nio-dev/attachments/20260108/d09c8088/attachment.htm>
More information about the nio-dev
mailing list