Skip to content

Commit 1dd942d

Browse files
committed
8278346: java/nio/file/Files/probeContentType/Basic.java fails on Linux SLES15 machine
Reviewed-by: bpb Backport-of: fd8cb2dae87e5726e89a1789e5a1ddd461c4400d
1 parent c64f12c commit 1dd942d

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
@@ -111,8 +111,8 @@ static int checkContentTypes(ExType[] exTypes)
111111
+ " cannot be determined");
112112
failures++;
113113
} else if (!expectedTypes.contains(type)) {
114-
System.err.printf("Content type: %s; expected: %s%n",
115-
type, expectedTypes);
114+
System.err.printf("For extension %s we got content type: %s; expected: %s%n",
115+
extension, type, expectedTypes);
116116
failures++;
117117
}
118118
} finally {
@@ -156,7 +156,7 @@ public static void main(String[] args) throws IOException {
156156
// Verify that certain extensions are mapped to the correct type.
157157
var exTypes = new ExType[] {
158158
new ExType("adoc", List.of("text/plain")),
159-
new ExType("bz2", List.of("application/bz2", "application/x-bzip2")),
159+
new ExType("bz2", List.of("application/bz2", "application/x-bzip2", "application/x-bzip")),
160160
new ExType("css", List.of("text/css")),
161161
new ExType("csv", List.of("text/csv")),
162162
new ExType("doc", List.of("application/msword")),
@@ -167,19 +167,19 @@ public static void main(String[] args) throws IOException {
167167
new ExType("js", List.of("text/javascript", "application/javascript")),
168168
new ExType("json", List.of("application/json")),
169169
new ExType("markdown", List.of("text/markdown")),
170-
new ExType("md", List.of("text/markdown")),
170+
new ExType("md", List.of("text/markdown", "application/x-genesis-rom")),
171171
new ExType("mp3", List.of("audio/mpeg")),
172172
new ExType("mp4", List.of("video/mp4")),
173173
new ExType("odp", List.of("application/vnd.oasis.opendocument.presentation")),
174174
new ExType("ods", List.of("application/vnd.oasis.opendocument.spreadsheet")),
175175
new ExType("odt", List.of("application/vnd.oasis.opendocument.text")),
176176
new ExType("pdf", List.of("application/pdf")),
177-
new ExType("php", List.of("text/plain", "text/php")),
177+
new ExType("php", List.of("text/plain", "text/php", "application/x-php")),
178178
new ExType("png", List.of("image/png")),
179179
new ExType("ppt", List.of("application/vnd.ms-powerpoint")),
180180
new ExType("pptx",List.of("application/vnd.openxmlformats-officedocument.presentationml.presentation")),
181181
new ExType("py", List.of("text/plain", "text/x-python", "text/x-python-script")),
182-
new ExType("rar", List.of("application/rar", "application/vnd.rar")),
182+
new ExType("rar", List.of("application/rar", "application/vnd.rar", "application/x-rar")),
183183
new ExType("rtf", List.of("application/rtf", "text/rtf")),
184184
new ExType("webm", List.of("video/webm")),
185185
new ExType("webp", List.of("image/webp")),

0 commit comments

Comments
 (0)