You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by jl...@apache.org on 2018/09/24 19:04:27 UTC
[incubator-netbeans] 04/07: MODULE_BOOT_PATH must be empty for
OpenJDK modules.
This is an automated email from the ASF dual-hosted git repository.
jlahoda pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git
commit e78e7c2653f28d56c4cf3416d9d87d63b9882269
Author: Jan Lahoda <jl...@netbeans.org>
AuthorDate: Sun Sep 23 07:58:51 2018 +0200
MODULE_BOOT_PATH must be empty for OpenJDK modules.
---
.../java/openjdk/project/ClassPathProviderImpl.java | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/java/java.openjdk.project/src/org/netbeans/modules/java/openjdk/project/ClassPathProviderImpl.java b/java/java.openjdk.project/src/org/netbeans/modules/java/openjdk/project/ClassPathProviderImpl.java
index 3e3a1cf..5319740 100644
--- a/java/java.openjdk.project/src/org/netbeans/modules/java/openjdk/project/ClassPathProviderImpl.java
+++ b/java/java.openjdk.project/src/org/netbeans/modules/java/openjdk/project/ClassPathProviderImpl.java
@@ -39,6 +39,7 @@ import javax.swing.event.ChangeListener;
import org.netbeans.api.java.classpath.ClassPath;
import org.netbeans.api.java.classpath.GlobalPathRegistry;
+import org.netbeans.api.java.classpath.JavaClassPathConstants;
import org.netbeans.api.project.libraries.Library;
import org.netbeans.api.project.libraries.LibraryManager;
import org.netbeans.modules.java.openjdk.project.JDKProject.Root;
@@ -69,6 +70,7 @@ public class ClassPathProviderImpl implements ClassPathProvider {
};
private final ClassPath bootCP;
+ private final ClassPath moduleBootCP;
private final ClassPath compileCP;
private final ClassPath moduleCompileCP;
private final ClassPath sourceCP;
@@ -77,6 +79,7 @@ public class ClassPathProviderImpl implements ClassPathProvider {
public ClassPathProviderImpl(JDKProject project) {
bootCP = ClassPath.EMPTY;
+ moduleBootCP = ClassPath.EMPTY;
File fakeJdk = InstalledFileLocator.getDefault().locate("modules/ext/fakeJdkClasses.zip", "org.netbeans.modules.java.openjdk.project", false);
URL fakeJdkURL = null;
@@ -187,22 +190,18 @@ public class ClassPathProviderImpl implements ClassPathProvider {
return FileUtil.getArchiveRoot(projectDir.toURI().resolve("fake-target.jar").toURL());
}
- /**
- * Copied from JavaClassPathConstants, to avoid depending on a new version of it.
- */
- private static final String MODULE_COMPILE_PATH = "modules/compile";
- private static final String MODULE_CLASS_PATH = "modules/classpath";
-
@Override
public ClassPath findClassPath(FileObject file, String type) {
if (sourceCP.findOwnerRoot(file) != null) {
if (ClassPath.BOOT.equals(type)) {
return bootCP;
+ } else if (JavaClassPathConstants.MODULE_BOOT_PATH.equals(type)) {
+ return bootCP;
} else if (ClassPath.COMPILE.equals(type)) {
return compileCP;
} else if (ClassPath.SOURCE.equals(type)) {
return sourceCP;
- } else if (MODULE_COMPILE_PATH.equals(type)) {
+ } else if (JavaClassPathConstants.MODULE_COMPILE_PATH.equals(type)) {
return moduleCompileCP;
}
} else {
@@ -211,8 +210,8 @@ public class ClassPathProviderImpl implements ClassPathProvider {
if (ClassPath.BOOT.equals(type)) {
return ClassPath.EMPTY;
} else if (ClassPath.COMPILE.equals(type) ||
- MODULE_COMPILE_PATH.equals(type) ||
- MODULE_CLASS_PATH.equals(type)) {
+ JavaClassPathConstants.MODULE_COMPILE_PATH.equals(type) ||
+ JavaClassPathConstants.MODULE_CLASS_PATH.equals(type)) {
return testsCompileCP;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists