Skip to content
Permalink
Browse files
8278346: java/nio/file/Files/probeContentType/Basic.java fails on Lin…
…ux SLES15 machine

Backport-of: fd8cb2dae87e5726e89a1789e5a1ddd461c4400d
  • Loading branch information
MBaesken committed Feb 17, 2022
1 parent 0e5810d commit a59e8cbc0fa61c3d976ed829bf88de123904b127
Showing 1 changed file with 6 additions and 6 deletions.
@@ -110,8 +110,8 @@ static int checkContentTypes(ExType[] exTypes)
+ " cannot be determined");
failures++;
} else if (!expectedTypes.contains(type)) {
System.err.printf("Content type: %s; expected: %s%n",
type, expectedTypes);
System.err.printf("For extension %s we got content type: %s; expected: %s%n",
extension, type, expectedTypes);
failures++;
}
} finally {
@@ -155,7 +155,7 @@ public static void main(String[] args) throws IOException {
// Verify that certain extensions are mapped to the correct type.
var exTypes = new ExType[] {
new ExType("adoc", List.of("text/plain")),
new ExType("bz2", List.of("application/bz2", "application/x-bzip2")),
new ExType("bz2", List.of("application/bz2", "application/x-bzip2", "application/x-bzip")),
new ExType("css", List.of("text/css")),
new ExType("csv", List.of("text/csv")),
new ExType("doc", List.of("application/msword")),
@@ -166,19 +166,19 @@ public static void main(String[] args) throws IOException {
new ExType("js", List.of("text/javascript", "application/javascript")),
new ExType("json", List.of("application/json")),
new ExType("markdown", List.of("text/markdown")),
new ExType("md", List.of("text/markdown")),
new ExType("md", List.of("text/markdown", "application/x-genesis-rom")),
new ExType("mp3", List.of("audio/mpeg")),
new ExType("mp4", List.of("video/mp4")),
new ExType("odp", List.of("application/vnd.oasis.opendocument.presentation")),
new ExType("ods", List.of("application/vnd.oasis.opendocument.spreadsheet")),
new ExType("odt", List.of("application/vnd.oasis.opendocument.text")),
new ExType("pdf", List.of("application/pdf")),
new ExType("php", List.of("text/plain", "text/php")),
new ExType("php", List.of("text/plain", "text/php", "application/x-php")),
new ExType("png", List.of("image/png")),
new ExType("ppt", List.of("application/vnd.ms-powerpoint")),
new ExType("pptx",List.of("application/vnd.openxmlformats-officedocument.presentationml.presentation")),
new ExType("py", List.of("text/plain", "text/x-python", "text/x-python-script")),
new ExType("rar", List.of("application/rar", "application/vnd.rar")),
new ExType("rar", List.of("application/rar", "application/vnd.rar", "application/x-rar")),
new ExType("rtf", List.of("application/rtf", "text/rtf")),
new ExType("webm", List.of("video/webm")),
new ExType("webp", List.of("image/webp")),

1 comment on commit a59e8cb

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on a59e8cb Feb 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.