Skip to content

Commit

Permalink
Fix Files name collision
Browse files Browse the repository at this point in the history
Regression from b282b5c.
  • Loading branch information
gaul committed Nov 20, 2022
1 parent b282b5c commit 552eb95
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import java.io.IOException;
import java.io.InputStream;
import java.net.URLDecoder;
import java.nio.file.Files;
import java.util.Random;
import java.util.concurrent.TimeUnit;

Expand Down Expand Up @@ -269,7 +268,7 @@ public void testUploadBigFile() throws Exception {
Payload payload = null;

try {
f = Files.createTempFile("jclouds", "tmp").toFile();
f = java.nio.file.Files.createTempFile("jclouds", "tmp").toFile();
long length = (new Random().nextInt(32) + 1) * 1024L * 1024L;
TestUtils.randomByteSource().slice(0, length).copyTo(Files.asByteSink(f));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import java.lang.annotation.Target;
import java.net.URI;
import java.net.URLEncoder;
import java.nio.file.Files;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import java.util.Collection;
Expand Down Expand Up @@ -1037,7 +1036,7 @@ public void testMultipartWithParamStringPartNullNotOk() throws Exception {
public void testMultipartWithParamFilePart() throws Exception {
Invokable<?, ?> method = method(TestMultipartForm.class, "withParamFilePart", String.class,
File.class);
File file = Files.createTempFile("foo", "bar").toFile();
File file = java.nio.file.Files.createTempFile("foo", "bar").toFile();
try {
Files.append("foobledata", file, UTF_8);

Expand Down Expand Up @@ -1083,7 +1082,7 @@ public void testMultipartWithParamByteArrayPart() throws Exception {
public void testMultipartWithParamFileBinaryPart() throws Exception {
Invokable<?, ?> method = method(TestMultipartForm.class, "withParamFileBinaryPart",
String.class, File.class);
File file = Files.createTempFile("foo", "bar").toFile();
File file = java.nio.file.Files.createTempFile("foo", "bar").toFile();
try {
Files.write(new byte[] { 17, 26, 39, 40, 50 }, file);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import java.io.IOException;
import java.io.PrintStream;
import java.net.InetAddress;
import java.nio.file.Files;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.Executors;
Expand Down Expand Up @@ -162,7 +161,7 @@ public void close() {

@Test
public void testPutAndGet() throws IOException {
temp = Files.createTempFile("foo", "bar").toFile();
temp = java.nio.file.Files.createTempFile("foo", "bar").toFile();
try {
SshClient client = setupClient();
client.put(temp.getAbsolutePath(), Payloads.newStringPayload("rabbit"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import java.io.IOException;
import java.io.PrintStream;
import java.net.InetAddress;
import java.nio.file.Files;

import org.jclouds.compute.domain.ExecChannel;
import org.jclouds.compute.domain.ExecResponse;
Expand Down Expand Up @@ -149,7 +148,7 @@ public void close() {
}

public void testPutAndGet() throws IOException {
temp = Files.createTempFile("foo", "bar").toFile();
temp = java.nio.file.Files.createTempFile("foo", "bar").toFile();
try {
SshClient client = setupClient();
client.put(temp.getAbsolutePath(), Payloads.newStringPayload("rabbit"));
Expand Down

0 comments on commit 552eb95

Please sign in to comment.