Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jaxb
diff options
context:
space:
mode:
authorBrian Vosburgh2016-01-14 17:11:50 -0500
committerBrian Vosburgh2016-01-14 17:11:50 -0500
commit1299e5e061febdba053f82871f277a8ba0670e66 (patch)
tree8086226efcd96f63b1e539091e7402071d42c1a0 /jaxb
parent7a014a1a25c8d452ffb7ac19a74991c2ee80647e (diff)
downloadwebtools.dali-1299e5e061febdba053f82871f277a8ba0670e66.tar.gz
webtools.dali-1299e5e061febdba053f82871f277a8ba0670e66.tar.xz
webtools.dali-1299e5e061febdba053f82871f277a8ba0670e66.zip
[468637] fix StackOverflowError when type hierarchy has a cycle
Diffstat (limited to 'jaxb')
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaClassMapping.java4
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElement.java4
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRef.java4
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementRef.java18
4 files changed, 15 insertions, 15 deletions
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaClassMapping.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaClassMapping.java
index 9e52c22e3f..eed89d7473 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaClassMapping.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaClassMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2015 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2016 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -639,7 +639,7 @@ public class GenericJavaClassMapping
if (jaxbType.getMapping() != null
&& ! jaxbType.getMapping().isXmlTransient()
&& jaxbType.getMapping().getXmlRootElement() != null
- && TypeTools.isSubType(
+ && TypeTools.isSubTypeOf(
jaxbType.getTypeName().getFullyQualifiedName(), getJavaType().getTypeName().getFullyQualifiedName(), getJaxbProject().getJavaProject())) {
return true;
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElement.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElement.java
index 36671dfbd2..7896ffd63d 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElement.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElement.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2016 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -380,7 +380,7 @@ public class GenericJavaXmlElement
&& JavaProjectTools.findType(getJaxbProject().getJavaProject(), fqType) != null) {
String attributeBaseType = getAttributeMapping().getValueTypeName();
if (! StringTools.isBlank(attributeBaseType) // can be null if there is a setter with no getter
- && ! TypeTools.isSubType(fqType, attributeBaseType, getJaxbProject().getJavaProject())) {
+ && ! TypeTools.isSubTypeOf(fqType, attributeBaseType, getJaxbProject().getJavaProject())) {
messages.add(
this.buildValidationMessage(
getTypeTextRange(),
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRef.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRef.java
index dc60764bdb..a13f836b36 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRef.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/GenericJavaXmlElementRef.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2013 Oracle. All rights reserved.
+ * Copyright (c) 2011, 2016 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
@@ -251,7 +251,7 @@ public class GenericJavaXmlElementRef
// verify that type actually exists before validating
&& JavaProjectTools.findType(getJaxbProject().getJavaProject(), fqType) != null) {
String attributeValueType = getContext().getAttributeMapping().getValueTypeName();
- if (! TypeTools.isSubType(fqType, attributeValueType, getJaxbProject().getJavaProject())) {
+ if (! TypeTools.isSubTypeOf(fqType, attributeValueType, getJaxbProject().getJavaProject())) {
messages.add(
this.buildValidationMessage(
getTypeTextRange(),
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementRef.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementRef.java
index 508dd2b298..4b369f6a40 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementRef.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/internal/context/java/ELJavaXmlElementRef.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2012 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Oracle - initial API and implementation
- *******************************************************************************/
+ * Copyright (c) 2012, 2016 Oracle. 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 http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
package org.eclipse.jpt.jaxb.eclipselink.core.internal.context.java;
import org.eclipse.jpt.common.core.internal.utility.TypeTools;
@@ -26,6 +26,6 @@ public class ELJavaXmlElementRef
@Override
protected boolean isTypeJAXBElement() {
String fqType = getFullyQualifiedType();
- return fqType != null && TypeTools.isSubType(getFullyQualifiedType(), JAXB.JAXB_ELEMENT, getJaxbProject().getJavaProject());
+ return fqType != null && TypeTools.isSubTypeOf(getFullyQualifiedType(), JAXB.JAXB_ELEMENT, getJaxbProject().getJavaProject());
}
}

Back to the top