Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Brychcy2019-07-13 11:41:40 -0400
committerTill Brychcy2019-07-13 11:41:40 -0400
commit265420db571ba7066a328ee53aa99f6ab72981a9 (patch)
treef40100db0b17f4a5fee141a0b450722f7a589683
parentc39e93d0aacaff957f2885c7bda1cc96ea144b8b (diff)
downloadeclipse.jdt.core-265420db571ba7066a328ee53aa99f6ab72981a9.tar.gz
eclipse.jdt.core-265420db571ba7066a328ee53aa99f6ab72981a9.tar.xz
eclipse.jdt.core-265420db571ba7066a328ee53aa99f6ab72981a9.zip
Bug 521276 - [9] cleanups related to
o.e.j.i.core.builder.ClasspathLocation.isOnModulePath and .module - update obsolete parameter names from autoModule to isOnModulePath - move field isOnModulePath to ClasspathDirectory/ClasspathJar, as it is not used in other subclasses of ClasspathLocation Change-Id: If502f5214d12dfbeeeeb580420ee082db909d1cc
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathDirectory.java1
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJar.java1
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathLocation.java17
3 files changed, 10 insertions, 9 deletions
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathDirectory.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathDirectory.java
index 623f116a66..012a927b3b 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathDirectory.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathDirectory.java
@@ -39,6 +39,7 @@ import org.eclipse.jdt.internal.core.util.Util;
public class ClasspathDirectory extends ClasspathLocation {
+final boolean isOnModulePath;
IContainer binaryFolder; // includes .class files for a single directory
boolean isOutputFolder;
SimpleLookupTable directoryCache;
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJar.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJar.java
index 449469aaeb..ca01706a47 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJar.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJar.java
@@ -48,6 +48,7 @@ import org.eclipse.jdt.internal.core.util.Util;
@SuppressWarnings("rawtypes")
public class ClasspathJar extends ClasspathLocation {
+final boolean isOnModulePath;
static class PackageCacheEntry {
long lastModified;
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathLocation.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathLocation.java
index 891aedec64..436922d72a 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathLocation.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathLocation.java
@@ -38,7 +38,6 @@ import org.eclipse.jdt.internal.compiler.util.Util;
public abstract class ClasspathLocation {
- protected boolean isOnModulePath;
protected IModule module;
protected IUpdatableModule.UpdatesByKind updates;
protected Set<String> limitModuleNames = null;
@@ -134,13 +133,13 @@ static ClasspathLocation forLibrary(String libraryPathname,
long lastModified,
AccessRuleSet accessRuleSet,
IPath annotationsPath,
- boolean autoModule,
+ boolean isOnModulePath,
String compliance) {
return Util.archiveFormat(libraryPathname) == Util.JMOD_FILE ?
new ClasspathJMod(libraryPathname, lastModified, accessRuleSet, annotationsPath) :
(compliance == null || (CompilerOptions.versionToJdkLevel(compliance) < ClassFileConstants.JDK9) ?
- new ClasspathJar(libraryPathname, lastModified, accessRuleSet, annotationsPath, autoModule) :
- new ClasspathMultiReleaseJar(libraryPathname, lastModified, accessRuleSet, annotationsPath, autoModule, compliance));
+ new ClasspathJar(libraryPathname, lastModified, accessRuleSet, annotationsPath, isOnModulePath) :
+ new ClasspathMultiReleaseJar(libraryPathname, lastModified, accessRuleSet, annotationsPath, isOnModulePath, compliance));
}
public static ClasspathJrt forJrtSystem(String jrtPath, AccessRuleSet accessRuleSet, IPath annotationsPath, String release) throws CoreException {
@@ -149,15 +148,15 @@ public static ClasspathJrt forJrtSystem(String jrtPath, AccessRuleSet accessRule
}
public static ClasspathLocation forLibrary(String libraryPathname, AccessRuleSet accessRuleSet, IPath annotationsPath,
- boolean autoModule, String compliance) {
- return forLibrary(libraryPathname, 0, accessRuleSet, annotationsPath, autoModule, compliance);
+ boolean isOnModulePath, String compliance) {
+ return forLibrary(libraryPathname, 0, accessRuleSet, annotationsPath, isOnModulePath, compliance);
}
static ClasspathLocation forLibrary(IFile library, AccessRuleSet accessRuleSet, IPath annotationsPath,
- boolean autoModule, String compliance) {
+ boolean isOnModulePath, String compliance) {
return (CompilerOptions.versionToJdkLevel(compliance) < ClassFileConstants.JDK9) ?
- new ClasspathJar(library, accessRuleSet, annotationsPath, autoModule) :
- new ClasspathMultiReleaseJar(library, accessRuleSet, annotationsPath, autoModule, compliance);
+ new ClasspathJar(library, accessRuleSet, annotationsPath, isOnModulePath) :
+ new ClasspathMultiReleaseJar(library, accessRuleSet, annotationsPath, isOnModulePath, compliance);
}
public static ClasspathLocation forLibrary(ZipFile zipFile, AccessRuleSet accessRuleSet, IPath externalAnnotationPath, boolean isOnModulePath, String compliance) {
return (CompilerOptions.versionToJdkLevel(compliance) < ClassFileConstants.JDK9) ?

Back to the top