Skip to content

Commit 081ee22

Browse files
author
Raúl Arabaolaza Barquin
authored
Remove the usage of Guava's Files.copy in favor of commons FileUtils in test (#565)
As there is no way to make simple code that works for both Guava 11 and 31 Note this is affecting only a test, no production code.
1 parent f662bfd commit 081ee22

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/java/com/cloudbees/jenkins/plugins/bitbucket/endpoints/BitbucketEndpointConfigurationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import com.cloudbees.plugins.credentials.SystemCredentialsProvider;
3131
import com.cloudbees.plugins.credentials.domains.Domain;
3232
import com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl;
33-
import com.google.common.io.Files;
3433
import com.google.common.io.Resources;
3534
import hudson.XmlFile;
3635
import hudson.security.ACL;
@@ -45,6 +44,7 @@
4544
import java.util.Collections;
4645
import java.util.List;
4746
import jenkins.model.Jenkins;
47+
import org.apache.commons.io.FileUtils;
4848
import org.junit.Before;
4949
import org.junit.ClassRule;
5050
import org.junit.Test;
@@ -634,7 +634,7 @@ public void given__instanceWithConfig__when__configRoundtrip__then__configRetain
634634
public void given__serverConfig__without__webhookImplementation__then__usePlugin() throws Exception {
635635
final URL configWithoutWebhookImpl = Resources.getResource(getClass(), "config-without-webhook-impl.xml");
636636
final File configFile = new File(Jenkins.get().getRootDir(), BitbucketEndpointConfiguration.class.getName() + ".xml");
637-
Files.copy(Resources.newInputStreamSupplier(configWithoutWebhookImpl), configFile);
637+
FileUtils.copyURLToFile(configWithoutWebhookImpl, configFile);
638638

639639
final BitbucketEndpointConfiguration instance = new BitbucketEndpointConfiguration();
640640

0 commit comments

Comments
 (0)