Can we deprecate Path.endsWith(String)?
John Rose
john.r.rose at oracle.com
Thu Jan 8 00:32:58 UTC 2026
On 7 Jan 2026, at 16:25, Brian Burkhalter wrote:
> …So, as I think, unless there is a substantial optimization to offer from merging this two operations, i would prefer just suggesting to use toString().{starts,ends}With directly
>
> 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…?
More information about the core-libs-dev
mailing list