[421366] NPE at VirtualResource.getProjectRelativePaths while doing
Maven Update Project
diff --git a/plugins/org.eclipse.wst.common.modulecore/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.common.modulecore/META-INF/MANIFEST.MF
index 2e047ef..fa8adee 100644
--- a/plugins/org.eclipse.wst.common.modulecore/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.wst.common.modulecore/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
Bundle-Name: %Bundle-Name.0
Bundle-Vendor: %provider
Bundle-SymbolicName: org.eclipse.wst.common.modulecore; singleton:=true
-Bundle-Version: 1.2.301.qualifier
+Bundle-Version: 1.2.302.qualifier
Bundle-Activator: org.eclipse.wst.common.componentcore.internal.ModulecorePlugin
Bundle-Localization: plugin
Export-Package: org.eclipse.wst.common.componentcore,
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualResource.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualResource.java
index 16c2c51..03756d5 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualResource.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualResource.java
@@ -116,7 +116,6 @@
public IPath[] getProjectRelativePaths() {
WorkbenchComponent aComponent = getReadOnlyComponent();
- IPath defaultSrcRoot = ((WorkbenchComponentImpl)aComponent).getDefaultSourceRoot();
if (aComponent != null) {
ResourceTreeRoot root = ResourceTreeRoot.getDeployResourceTreeRoot(aComponent);
// still need some sort of loop here to search subpieces of the
@@ -131,6 +130,7 @@
if (searchPath.isAbsolute())
searchPath = searchPath.makeRelative();
componentResources = root.findModuleResources(searchPath, ResourceTreeNode.CREATE_NONE);
+ IPath defaultSrcRoot = ((WorkbenchComponentImpl)aComponent).getDefaultSourceRoot();
estimatedPaths = findBestMatches(componentResources, defaultSrcRoot);
}
while (estimatedPaths.length == 0 && canSearchContinue(componentResources, searchPath));