diff options
author | Stephan Herrmann | 2019-04-23 10:21:54 +0000 |
---|---|---|
committer | Stephan Herrmann | 2019-04-26 21:39:46 +0000 |
commit | a5bb33f31600c5673590e85111231334faef5bd6 (patch) | |
tree | a8dfeb1e64c95a95768fdb53c0539fb633b81977 | |
parent | 88b5b03c829c2a6d784db7adef0f9f18aca2116c (diff) | |
download | eclipse.jdt.core-a5bb33f31600c5673590e85111231334faef5bd6.tar.gz eclipse.jdt.core-a5bb33f31600c5673590e85111231334faef5bd6.tar.xz eclipse.jdt.core-a5bb33f31600c5673590e85111231334faef5bd6.zip |
- make ModularClassFileMatchLocator more robust
Change-Id: Ie9e59b0b225282d3dc2c1fac4d6c18d7292362bc
Signed-off-by: Stephan Herrmann <stephan.herrmann@berlin.de>
-rw-r--r-- | org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/ModularClassFileMatchLocator.java | 7 |
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 { |