Skip to content

Commit fd8cb2d

Browse files
committed
8278346: java/nio/file/Files/probeContentType/Basic.java fails on Linux SLES15 machine
Reviewed-by: shade
1 parent e5cb84e commit fd8cb2d

File tree

1 file changed

+6
-6
lines changed
  • test/jdk/java/nio/file/Files/probeContentType

1 file changed

+6
-6
lines changed

test/jdk/java/nio/file/Files/probeContentType/Basic.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ static int checkContentTypes(ExType[] exTypes)
110110
+ " cannot be determined");
111111
failures++;
112112
} else if (!expectedTypes.contains(type)) {
113-
System.err.printf("Content type: %s; expected: %s%n",
114-
type, expectedTypes);
113+
System.err.printf("For extension %s we got content type: %s; expected: %s%n",
114+
extension, type, expectedTypes);
115115
failures++;
116116
}
117117
} finally {
@@ -155,7 +155,7 @@ public static void main(String[] args) throws IOException {
155155
// Verify that certain extensions are mapped to the correct type.
156156
var exTypes = new ExType[] {
157157
new ExType("adoc", List.of("text/plain")),
158-
new ExType("bz2", List.of("application/bz2", "application/x-bzip2")),
158+
new ExType("bz2", List.of("application/bz2", "application/x-bzip2", "application/x-bzip")),
159159
new ExType("css", List.of("text/css")),
160160
new ExType("csv", List.of("text/csv")),
161161
new ExType("doc", List.of("application/msword")),
@@ -166,19 +166,19 @@ public static void main(String[] args) throws IOException {
166166
new ExType("js", List.of("text/javascript", "application/javascript")),
167167
new ExType("json", List.of("application/json")),
168168
new ExType("markdown", List.of("text/markdown")),
169-
new ExType("md", List.of("text/markdown")),
169+
new ExType("md", List.of("text/markdown", "application/x-genesis-rom")),
170170
new ExType("mp3", List.of("audio/mpeg")),
171171
new ExType("mp4", List.of("video/mp4")),
172172
new ExType("odp", List.of("application/vnd.oasis.opendocument.presentation")),
173173
new ExType("ods", List.of("application/vnd.oasis.opendocument.spreadsheet")),
174174
new ExType("odt", List.of("application/vnd.oasis.opendocument.text")),
175175
new ExType("pdf", List.of("application/pdf")),
176-
new ExType("php", List.of("text/plain", "text/php")),
176+
new ExType("php", List.of("text/plain", "text/php", "application/x-php")),
177177
new ExType("png", List.of("image/png")),
178178
new ExType("ppt", List.of("application/vnd.ms-powerpoint")),
179179
new ExType("pptx",List.of("application/vnd.openxmlformats-officedocument.presentationml.presentation")),
180180
new ExType("py", List.of("text/plain", "text/x-python", "text/x-python-script")),
181-
new ExType("rar", List.of("application/rar", "application/vnd.rar")),
181+
new ExType("rar", List.of("application/rar", "application/vnd.rar", "application/x-rar")),
182182
new ExType("rtf", List.of("application/rtf", "text/rtf")),
183183
new ExType("webm", List.of("video/webm")),
184184
new ExType("webp", List.of("image/webp")),

0 commit comments

Comments
 (0)