diff -r c436e60e7af8 -r 2f24758e7ae0 langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/DocLint.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/DocLint.java Mon Apr 24 18:58:50 2017 +0200 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/doclint/DocLint.java Mon Apr 24 14:59:43 2017 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2017, 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 @@ -32,7 +32,6 @@ import java.util.LinkedList; import java.util.List; import java.util.Queue; -import java.util.regex.Pattern; import javax.lang.model.element.Name; import javax.tools.StandardLocation; @@ -148,9 +147,15 @@ JavacFileManager fm = new JavacFileManager(new Context(), false, null); fm.setSymbolFileEnabled(false); - fm.setLocation(StandardLocation.PLATFORM_CLASS_PATH, javacBootClassPath); - fm.setLocation(StandardLocation.CLASS_PATH, javacClassPath); - fm.setLocation(StandardLocation.SOURCE_PATH, javacSourcePath); + if (javacBootClassPath != null) { + fm.setLocation(StandardLocation.PLATFORM_CLASS_PATH, javacBootClassPath); + } + if (javacClassPath != null) { + fm.setLocation(StandardLocation.CLASS_PATH, javacClassPath); + } + if (javacSourcePath != null) { + fm.setLocation(StandardLocation.SOURCE_PATH, javacSourcePath); + } JavacTask task = tool.getTask(out, fm, null, javacOpts, null, fm.getJavaFileObjectsFromFiles(javacFiles));