Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvrubezhny2015-07-20 15:36:16 +0000
committervrubezhny2015-07-29 01:14:43 +0000
commite8d7345d5722a8ba204de95567b244b55eccbae6 (patch)
tree33bc544585572cfe633d0b39e5cdef045fb1d817
parent1bbe4c607916ec26668fe9b3afc99fe04643576d (diff)
downloadwebtools.jsdt-e8d7345d5722a8ba204de95567b244b55eccbae6.tar.gz
webtools.jsdt-e8d7345d5722a8ba204de95567b244b55eccbae6.tar.xz
webtools.jsdt-e8d7345d5722a8ba204de95567b244b55eccbae6.zip
Bug 473092 - NullPointerException in HandleFactory.getPkgFragmentRoot (360)
Issue is fixed Signed-off-by: vrubezhny <vrubezhny@exadel.com>
-rw-r--r--bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/util/HandleFactory.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/util/HandleFactory.java b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/util/HandleFactory.java
index cc1bb6178..44b6a4b52 100644
--- a/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/util/HandleFactory.java
+++ b/bundles/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/util/HandleFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -353,11 +353,14 @@ public class HandleFactory {
IPackageFragmentRoot[] roots= javaProject.getPackageFragmentRoots();
for (int j= 0, rootCount= roots.length; j < rootCount; j++) {
PackageFragmentRoot root= (PackageFragmentRoot)roots[j];
- if ( root.getPath().isPrefixOf(path) && !Util.isExcluded(path, root.fullInclusionPatternChars(), root.fullExclusionPatternChars(), false))
+ if ( root.getPath().isPrefixOf(path)
+ && !Util.isExcluded(path, root.fullInclusionPatternChars(), root.fullExclusionPatternChars(), false))
{
return root;
}
- if (!root.isExternal() && root.getLocation().isPrefixOf(path)
+
+ IPath rootLocation = root.getLocation();
+ if (rootLocation != null && !root.isExternal() && rootLocation.isPrefixOf(path)
&& !Util.isExcluded(path, root.fullInclusionPatternChars(), root.fullExclusionPatternChars(), false)) {
this.lastIsFullPath=true;
return root;

Back to the top