8030795: java/nio/file/Files/probeContentType/ForceLoad.java failing with ServiceConfigurationError without jtreg -agentvm option
Michael McMahon
michael.x.mcmahon at oracle.com
Mon Feb 3 06:11:28 PST 2014
Looks fine to me
- Michael
On 30/01/14 17:31, Alan Bateman wrote:
>
> This test fails when run in jtreg othervm mode because there is a
> service configuration file in the directory that lists a
> FileTypeDetector that isn't compiled by the test.
>
> There are many ways to fix this, the simplest is to just add @build
> tag to compile the dependency. I've also changed it to run in othervm
> mode because the test is to ensure that the underlying native code can
> be loaded before any other parts of the API are used.
>
> The proposed changed is below.
>
> -Alan
>
>
> diff --git a/test/java/nio/file/Files/probeContentType/ForceLoad.java
> b/test/java/nio/file/Files/probeContentType/ForceLoad.java
> --- a/test/java/nio/file/Files/probeContentType/ForceLoad.java
> +++ b/test/java/nio/file/Files/probeContentType/ForceLoad.java
> @@ -25,6 +25,8 @@
> * @bug 4313887
> * @summary Test library dependencies by invoking Files.probeContentType
> * before other methods that would cause nio.dll to be loaded.
> + * @build ForceLoad SimpleFileTypeDetector
> + * @run main/othervm ForceLoad
> */
More information about the nio-dev
mailing list