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

Reviewed-by: shade
  • Loading branch information
MBaesken committed Dec 8, 2021
1 parent e5cb84e commit fd8cb2dae87e5726e89a1789e5a1ddd461c4400d
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")),

7 comments on commit fd8cb2d

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on fd8cb2d Dec 8, 2021

Choose a reason for hiding this comment

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

@MBaesken
Copy link
Member Author

@MBaesken MBaesken commented on fd8cb2d Feb 16, 2022

Choose a reason for hiding this comment

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

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on fd8cb2d Feb 16, 2022

Choose a reason for hiding this comment

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

@MBaesken the backport was successfully created on the branch MBaesken-backport-fd8cb2da in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit fd8cb2da from the openjdk/jdk repository.

The commit being backported was authored by Matthias Baesken on 8 Dec 2021 and was reviewed by Aleksey Shipilev.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev MBaesken-backport-fd8cb2da:MBaesken-backport-fd8cb2da
$ git checkout MBaesken-backport-fd8cb2da
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev MBaesken-backport-fd8cb2da

@MBaesken
Copy link
Member Author

@MBaesken MBaesken commented on fd8cb2d Jun 1, 2022

Choose a reason for hiding this comment

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

/backport jdk11u

@openjdk
Copy link

@openjdk openjdk bot commented on fd8cb2d Jun 1, 2022

Choose a reason for hiding this comment

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

@MBaesken Could not automatically backport fd8cb2da to openjdk/jdk11u due to conflicts in the following files:

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

To manually resolve these conflicts run the following commands in your personal fork of openjdk/jdk11u:

$ git checkout -b MBaesken-backport-fd8cb2da
$ git fetch --no-tags https://git.openjdk.java.net/jdk fd8cb2dae87e5726e89a1789e5a1ddd461c4400d
$ git cherry-pick --no-commit fd8cb2dae87e5726e89a1789e5a1ddd461c4400d
$ # Resolve conflicts
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport fd8cb2dae87e5726e89a1789e5a1ddd461c4400d'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk11u with the title Backport fd8cb2dae87e5726e89a1789e5a1ddd461c4400d.

@gnu-andrew
Copy link
Member

@gnu-andrew gnu-andrew commented on fd8cb2d Jun 2, 2022

Choose a reason for hiding this comment

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

/backport jdk11u

@openjdk
Copy link

@openjdk openjdk bot commented on fd8cb2d Jun 2, 2022

Choose a reason for hiding this comment

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

@gnu-andrew the backport was successfully created on the branch gnu-andrew-backport-fd8cb2da in my personal fork of openjdk/jdk11u. To create a pull request with this backport targeting openjdk/jdk11u:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit fd8cb2da from the openjdk/jdk repository.

The commit being backported was authored by Matthias Baesken on 8 Dec 2021 and was reviewed by Aleksey Shipilev.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk11u:

$ git fetch https://github.com/openjdk-bots/jdk11u gnu-andrew-backport-fd8cb2da:gnu-andrew-backport-fd8cb2da
$ git checkout gnu-andrew-backport-fd8cb2da
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk11u gnu-andrew-backport-fd8cb2da

Please sign in to comment.