changeset 55619:1042cac8bc2a

8221596: test/hotspot/jtreg/runtime/containers/docker/TestCPUSets.java failed with FileAlreadyExistsException Summary: Using StandardCopyOption.REPLACE_EXISTING to copy whitebox.jar Reviewed-by: dholmes, mseledtsov Contributed-by: jiefu <fujie@loongson.cn>
author mseledtsov
date Fri, 29 Mar 2019 18:25:39 -0700
parents 8cd2af66ac7c
children b7ebff3e4e69
files test/lib/jdk/test/lib/containers/docker/Common.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/lib/jdk/test/lib/containers/docker/Common.java	Thu Mar 28 13:53:41 2019 -0400
+++ b/test/lib/jdk/test/lib/containers/docker/Common.java	Fri Mar 29 18:25:39 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@
 import java.io.File;
 import java.nio.file.Files;
 import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
 import jdk.test.lib.containers.docker.DockerRunOptions;
 import jdk.test.lib.containers.docker.DockerTestUtils;
 import jdk.test.lib.Utils;
@@ -46,7 +47,7 @@
 
     public static void prepareWhiteBox() throws Exception {
         Files.copy(Paths.get(new File("whitebox.jar").getAbsolutePath()),
-                   Paths.get(Utils.TEST_CLASSES, "whitebox.jar"));
+                   Paths.get(Utils.TEST_CLASSES, "whitebox.jar"), StandardCopyOption.REPLACE_EXISTING);
     }