summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2013-02-08 07:21:56 (EST)
committer Sven Rottstock2013-03-11 06:35:08 (EDT)
commit9a413b9361e7b0679013ef8f9e0adff2e0c52743 (patch)
treefa911352abff1411e2d91ec1eb5db56d3c7c9f88
parent3389bf01502a5692d066c7f07837713624b8ad9c (diff)
downloadorg.eclipse.stardust.ui.web-9a413b9361e7b0679013ef8f9e0adff2e0c52743.zip
org.eclipse.stardust.ui.web-9a413b9361e7b0679013ef8f9e0adff2e0c52743.tar.gz
org.eclipse.stardust.ui.web-9a413b9361e7b0679013ef8f9e0adff2e0c52743.tar.bz2
Jira-ID: CRNT-27888
Added Null Pointer check on call XPathCacheManager.getInstance().getXpathMap(model, dataPath) in DescriptorFilterUtils.getSortableAndFilterableFlags() git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@62862 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/descriptors/DescriptorFilterUtils.java37
1 files changed, 23 insertions, 14 deletions
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/descriptors/DescriptorFilterUtils.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/descriptors/DescriptorFilterUtils.java
index 89608c1..f207467 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/descriptors/DescriptorFilterUtils.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/descriptors/DescriptorFilterUtils.java
@@ -137,25 +137,34 @@ public class DescriptorFilterUtils
// For performance get data from Cache
IXPathMap xPathMap = XPathCacheManager.getInstance().getXpathMap(model, dataPath);
-
- // but, if, for example, indexes are removed, the semantics of the query is
- // then different!
- // my current favourite solution would be not allowing entering indexes in
- // the modeller,
- // in the XPath dialog for process data descriptors
- TypedXPath typedXPath = xPathMap.getXPath(myXPath);
-
- if (typedXPath == null)
+ if (null == xPathMap)
{
trace.warn("Invalid structured data reference. Data path id was '" + dataPath.getId()
+ "' and has referenced the following access path '" + myXPath + "'");
}
- // test, if the XPath returns a primitive
- else if (typedXPath.getType() != BigData.NULL)
+ else
{
- // it is a list of primitives or a single primitive
- flags.filterable = true;
- flags.sortable = !typedXPath.isList();
+ // but, if, for example, indexes are removed, the semantics of the
+ // query is
+ // then different!
+ // my current favourite solution would be not allowing entering
+ // indexes in
+ // the modeller,
+ // in the XPath dialog for process data descriptors
+ TypedXPath typedXPath = xPathMap.getXPath(myXPath);
+
+ if (typedXPath == null)
+ {
+ trace.warn("Invalid structured data reference. Data path id was '" + dataPath.getId()
+ + "' and has referenced the following access path '" + myXPath + "'");
+ }
+ // test, if the XPath returns a primitive
+ else if (typedXPath.getType() != BigData.NULL)
+ {
+ // it is a list of primitives or a single primitive
+ flags.filterable = true;
+ flags.sortable = !typedXPath.isList();
+ }
}
}
else