Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2019-02-05 15:12:46 +0000
committerStephan Herrmann2019-02-05 15:12:46 +0000
commitf040c09eb77b61b62871d12824721e3d8c38bade (patch)
treeada493f0eb265f007893558484734711e1b62e1e
parent705bf0beff6f458ef068964094f5fecf359aec3c (diff)
downloadeclipse.jdt.core-f040c09eb77b61b62871d12824721e3d8c38bade.tar.gz
eclipse.jdt.core-f040c09eb77b61b62871d12824721e3d8c38bade.tar.xz
eclipse.jdt.core-f040c09eb77b61b62871d12824721e3d8c38bade.zip
Bug 544017 - [9] bogus error in editor: "The type com.example.sub.b.B is
not accessable." Change-Id: Idb1a5f043aa8a555454e16b3cfb60283e0b68e74 Signed-off-by: Stephan Herrmann <stephan.herrmann@berlin.de>
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryModuleBinding.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryModuleBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryModuleBinding.java
index 6c4cb11224..89cbe361a1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryModuleBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryModuleBinding.java
@@ -108,7 +108,7 @@ public class BinaryModuleBinding extends ModuleBinding {
}
// TODO(SHMOD): handle null case
}
- if (count < this.requiresTransitive.length)
+ if (count < this.requires.length)
System.arraycopy(this.requires, 0, this.requires = new ModuleBinding[count], 0, count);
if (transitiveCount < this.requiresTransitive.length)
System.arraycopy(this.requiresTransitive, 0, this.requiresTransitive = new ModuleBinding[transitiveCount], 0, transitiveCount);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
index 0199eae16c..8993942d9b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
@@ -213,7 +213,6 @@ void checkAndSetImports() {
if (this.referenceContext.moduleDeclaration != null) {
this.referenceContext.moduleDeclaration.resolveModuleDirectives(this);
- this.referenceContext.moduleDeclaration.resolvePackageDirectives(this);
}
if (this.referenceContext.imports == null) {
@@ -512,6 +511,7 @@ void faultInImports() {
public void faultInTypes() {
faultInImports();
if (this.referenceContext.moduleDeclaration != null) {
+ this.referenceContext.moduleDeclaration.resolvePackageDirectives(this);
this.referenceContext.moduleDeclaration.resolveTypeDirectives(this);
} else if (this.referenceContext.currentPackage != null) {
this.referenceContext.currentPackage.checkPackageConflict(this);

Back to the top