Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/ModularClassFileMatchLocator.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/ModularClassFileMatchLocator.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/ModularClassFileMatchLocator.java
index 8e432543e0..d7e7e22cf1 100644
--- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/ModularClassFileMatchLocator.java
+++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/ModularClassFileMatchLocator.java
@@ -99,9 +99,14 @@ public class ModularClassFileMatchLocator implements IIndexConstants {
return;
}
ModulePattern modulePattern = (ModulePattern) pattern;
+ if (!modulePattern.findReferences) {
+ return;
+ }
matchModuleReferences(locator, modulePattern, this.binaryModule.exports());
matchModuleReferences(locator, modulePattern, this.binaryModule.opens());
- matchModuleReferences(locator, modulePattern, this.module.getAllRequiredModules());
+ if (this.module != null) {
+ matchModuleReferences(locator, modulePattern, this.module.getAllRequiredModules());
+ }
}
private void matchModuleReference(MatchLocator locator, ModulePattern modulePattern,
char[][] modules, boolean isTarget) throws CoreException {

Back to the top