Skip to content

Commit 6f432fb

Browse files
authored
Replace two deprecated methods (#347)
1 parent 31b9fa0 commit 6f432fb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import java.nio.file.Path;
4141
import java.nio.file.Paths;
4242
import java.nio.file.SimpleFileVisitor;
43+
import java.nio.file.StandardCopyOption;
4344
import java.nio.file.attribute.BasicFileAttributes;
4445
import java.util.ArrayList;
4546
import java.util.Arrays;
@@ -716,7 +717,7 @@ protected static void copyResource(URL url, File file) throws IOException {
716717
throw new NullPointerException("The url could not be null.");
717718
}
718719

719-
FileUtils.copyURLToFile(url, file);
720+
Files.copy(url.openStream(), file.toPath(), StandardCopyOption.REPLACE_EXISTING);
720721
}
721722

722723
/**
@@ -801,7 +802,7 @@ protected static void invokeMaven(
801802
} else {
802803
request.setDebug(true);
803804
}
804-
request.setGoals(goals);
805+
request.addArgs(goals);
805806
if (properties != null) {
806807
request.setProperties(properties);
807808
}

0 commit comments

Comments
 (0)