summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2013-02-15 06:56:17 (EST)
committer Sven Rottstock2013-03-11 06:36:32 (EDT)
commit841c375f7ebe835a8a9112f88584d072a6cfe19f (patch)
tree0da2e08ea3a8ad22f5e2c0ca4c95b0dd488a9c63
parentaba000d487508dc8353206e65e9195542ab453a9 (diff)
downloadorg.eclipse.stardust.ui.web-841c375f7ebe835a8a9112f88584d072a6cfe19f.zip
org.eclipse.stardust.ui.web-841c375f7ebe835a8a9112f88584d072a6cfe19f.tar.gz
org.eclipse.stardust.ui.web-841c375f7ebe835a8a9112f88584d072a6cfe19f.tar.bz2
Jira-ID: CRNT-27888
Added a check if typeDeclarationId is null for reference model data. git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@63046 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/XPathCacheManager.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/XPathCacheManager.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/XPathCacheManager.java
index 7abda5a..0f3efe3 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/XPathCacheManager.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/XPathCacheManager.java
@@ -116,6 +116,10 @@ public class XPathCacheManager
if (null == xPathMap)
{
TypeDeclarationCacheKey typeCachKey = getTypeCacheKey(refModel, data);
+ if (null == typeCachKey)
+ {
+ return null;
+ }
xPathMap = typeXPathMapCache.get(typeCachKey);
if (null == xPathMap)
{
@@ -183,7 +187,11 @@ public class XPathCacheManager
String metadataComplexTypeName = (String)data.getAttribute(DmsConstants.RESOURCE_METADATA_SCHEMA_ATT);
typeDeclaration = model.getTypeDeclaration(metadataComplexTypeName);
}
-
+ // return null if typeDeclaration is missing on ref struct type
+ if (null == typeDeclaration)
+ {
+ return null;
+ }
XSDSchema schema = StructuredTypeRtUtils.getXSDSchema(model, typeDeclaration);
XSDNamedComponent component = StructuredTypeRtUtils.findElementOrTypeDeclaration(schema, typeDeclaration.getId(),
true);