RFR: 8287237: (fs) Files.probeContentType returns null if filename contains hash mark on Linux
Jaikiran Pai
jpai at openjdk.java.net
Fri May 27 12:27:45 UTC 2022
On Thu, 26 May 2022 23:03:05 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Modify `sun.net.www.MimeTable.findByFileName(String)` to attempt to find the file extension in the entire file name if it is not found in the portion of the name preceding the optional fragment beginning with a hash (`#`).
test/jdk/java/nio/file/Files/probeContentType/Basic.java line 197:
> 195: String contentType = Files.probeContentType(pathWithFragement);
> 196: if (contentType == null || !contentType.equals("image/png")) {
> 197: System.out.printf("For %s expected \"png\" but got %s%n",
Should this instead use `System.err`, since the rest of the test uses that for printing these failures when incrementing the failure count.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8909
More information about the net-dev
mailing list