Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Fullbright2013-03-15 18:31:51 +0000
committerPaul Fullbright2013-03-19 21:37:57 +0000
commite8a49366f716b326abadcc412e35ba5ed361d8f3 (patch)
tree87a5a93869cc8adc205d38d6ed9e05e7d5fb5a35 /jaxb/plugins
parent49b38f3b515a4d1f4aa3420bf24c653b1e9cde5d (diff)
downloadwebtools.dali-e8a49366f716b326abadcc412e35ba5ed361d8f3.tar.gz
webtools.dali-e8a49366f716b326abadcc412e35ba5ed361d8f3.tar.xz
webtools.dali-e8a49366f716b326abadcc412e35ba5ed361d8f3.zip
fixed validation error when there is no schema against which to validate
Diffstat (limited to 'jaxb/plugins')
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/xpath/java/XPath.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/xpath/java/XPath.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/xpath/java/XPath.java
index 9c543ac902..a10bcc4914 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/xpath/java/XPath.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/xpath/java/XPath.java
@@ -433,6 +433,11 @@ public class XPath {
protected void validate(
Context context, XsdTypeDefinition previousType, List<IMessage> messages) {
+ if (previousType == null) {
+ // nothing to evaluate against
+ return;
+ }
+
String namespace = resolveNamespace(context);
if (namespace == null) {
@@ -444,7 +449,7 @@ public class XPath {
this.nsPrefix));
}
- XsdTypeDefinition nextType = (previousType == null) ? null : validateLocalName(context, previousType, namespace, messages);
+ XsdTypeDefinition nextType = validateLocalName(context, previousType, namespace, messages);
if (nextType != null) {
Step nextStep = getNextStep();
if (nextStep != null) {

Back to the top