The scheme specific part of a local file URI is "//" + file.getPath, not just file.getPath. Because the code compares the scheme specific part of the user-provided URI against the path, this will not match the specified file URI in practice.
Given that the scheme of the classpath entry URI is ignored and assumed to be file:, File<->URI/URL conversions are tricky due to things like Windows UNC filenames, and the -doc-external-uris feature doesn't currently work as specified, I think the proper fix is to change the syntax and not go through URIs or URLs at all. Because users can figure out that an incorrect file URI like file:/home/user/demo.jar is accepted, it might be considered a breaking change, though.
The text was updated successfully, but these errors were encountered: