Skip to content

Commit bb2e0d8

Browse files
yukikimmuraRealCLanger
authored andcommitted
8305528: [11u] Backport of JDK-8259530 breaks build with JDK10 bootstrap VM
Reviewed-by: phh, clanger
1 parent 3c8c45e commit bb2e0d8

File tree

1 file changed

+3
-2
lines changed
  • src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html

1 file changed

+3
-2
lines changed

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import java.io.Writer;
3131
import java.nio.file.DirectoryStream;
3232
import java.nio.file.Files;
33+
import java.nio.file.FileSystems;
3334
import java.nio.file.InvalidPathException;
3435
import java.nio.file.Path;
3536
import java.util.*;
@@ -243,14 +244,14 @@ private void copyLegalFiles(boolean includeJQuery) throws DocletException {
243244
switch (legalNotices) {
244245
case "":
245246
case "default" :
246-
Path javaHome = Path.of(System.getProperty("java.home"));
247+
Path javaHome = FileSystems.getDefault().getPath(System.getProperty("java.home"));
247248
legalNoticesDir = javaHome.resolve("legal").resolve(getClass().getModule().getName());
248249
break;
249250
case "none":
250251
return;
251252
default:
252253
try {
253-
legalNoticesDir = Path.of(legalNotices);
254+
legalNoticesDir = FileSystems.getDefault().getPath(legalNotices);
254255
} catch (InvalidPathException e) {
255256
messages.error("doclet.Error_invalid_path_for_legal_notices",
256257
legalNotices, e.getMessage());

0 commit comments

Comments
 (0)