On Thu, Sep 18, 2025 at 7:08 PM Brian Burkhalter <[email protected]> wrote:
<snip> > I have filed an issue to improve the specification of this method somehow: > > https://bugs.openjdk.org/browse/JDK-8368007 > Personally, a better spec wouldn't have helped me avoid the trap. The spec is already clear. I think it's the combination of the method's name and the argument type that is misleading. I think I learned about this method by scrolling autocompletion suggestions in my IDE. The method seemed to fit my need exactly. Of course, I quickly learned that I was wrong, but somehow kept falling into the same trap. Not sure how representative my experience in this case is, though. Deprecation would flag the method in the IDE and help avoid the trap. But eventually, it would be good to also have the file extension functionality.
