Despite the @implSpec clarifying its behavior, Path.endsWith(String) appears to be easily taken to being equivalent to Path.toString().endsWith(String), thereby leading to unexpected behavior. The verbiage of this method could be enhanced to make the expected behavior more explicit. Similar story for Path.startsWith(String). Please refer to the linked mailing list threads for more background.
- links to