diff options
author | pfullbright | 2010-05-27 18:15:38 +0000 |
---|---|---|
committer | pfullbright | 2010-05-27 18:15:38 +0000 |
commit | 990820abe670d475c3934766b9cdca08a2a58d73 (patch) | |
tree | 4644999f4f80244a80b7e9e44dcc31eb622cce78 /jpa | |
parent | dba0a9f53357c90999933b59e925c12e9e738bd1 (diff) | |
download | webtools.dali-990820abe670d475c3934766b9cdca08a2a58d73.tar.gz webtools.dali-990820abe670d475c3934766b9cdca08a2a58d73.tar.xz webtools.dali-990820abe670d475c3934766b9cdca08a2a58d73.zip |
bug 314172 - removed StackOverflowError in validation
Diffstat (limited to 'jpa')
2 files changed, 6 insertions, 4 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmAttributeOverrideContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmAttributeOverrideContainer.java index 7a757d79ac..59e42b7749 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmAttributeOverrideContainer.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmAttributeOverrideContainer.java @@ -327,9 +327,6 @@ public class GenericOrmAttributeOverrideContainer } public TextRange getValidationTextRange() { - if (specifiedAttributeOverridesSize() > 0) { - return this.specifiedAttributeOverrides.get(0).getValidationTextRange(); - } return getOwner().getValidationTextRange(); } diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmEmbeddedIdMapping.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmEmbeddedIdMapping.java index 7a337958dc..21619f2025 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmEmbeddedIdMapping.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmEmbeddedIdMapping.java @@ -26,6 +26,7 @@ import org.eclipse.jpt.core.jpa2.context.EmbeddedIdMapping2_0; import org.eclipse.jpt.core.jpa2.context.SingleRelationshipMapping2_0; import org.eclipse.jpt.core.resource.orm.Attributes; import org.eclipse.jpt.core.resource.orm.XmlEmbeddedId; +import org.eclipse.jpt.core.utility.TextRange; import org.eclipse.jpt.utility.internal.CollectionTools; import org.eclipse.jpt.utility.internal.Tools; import org.eclipse.jpt.utility.internal.iterables.CompositeIterable; @@ -184,13 +185,17 @@ public class GenericOrmEmbeddedIdMapping // (in JPA 1.0, this will obviously never be reached) if (isMappedByRelationship() && getAttributeOverrideContainer().specifiedAttributeOverridesSize() > 0) { + TextRange textRange = getAttributeOverrideContainer().getValidationTextRange(); + if (!isVirtual()) { + textRange = getAttributeOverrideContainer().specifiedAttributeOverrides().next().getValidationTextRange(); + } messages.add( DefaultJpaValidationMessages.buildMessage( IMessage.HIGH_SEVERITY, JpaValidationMessages.EMBEDDED_ID_MAPPING_MAPPED_BY_RELATIONSHIP_AND_ATTRIBUTE_OVERRIDES_SPECIFIED, new String[] {}, getAttributeOverrideContainer(), - getAttributeOverrideContainer().getValidationTextRange())); + textRange)); } } } |