METAGEN-82 Fixed a few inconsistencies in the way @MappedSuperClass

are considered
This commit is contained in:
Guillaume Smet 2012-03-11 02:29:19 +01:00 committed by Strong Liu
parent 0ff88cff1f
commit 0c18c38a55
2 changed files with 7 additions and 7 deletions

View File

@ -259,11 +259,11 @@ public class JPAMetaModelEntityProcessor extends AbstractProcessor {
private MetaEntity tryGettingExistingEntityFromContext(AnnotationMirror mirror, String fqn) { private MetaEntity tryGettingExistingEntityFromContext(AnnotationMirror mirror, String fqn) {
MetaEntity alreadyExistingMetaEntity = null; MetaEntity alreadyExistingMetaEntity = null;
if ( TypeUtils.isAnnotationMirrorOfType( mirror, Constants.ENTITY ) ) { if ( TypeUtils.isAnnotationMirrorOfType( mirror, Constants.ENTITY )
|| TypeUtils.isAnnotationMirrorOfType( mirror, Constants.MAPPED_SUPERCLASS )) {
alreadyExistingMetaEntity = context.getMetaEntity( fqn ); alreadyExistingMetaEntity = context.getMetaEntity( fqn );
} }
else if ( TypeUtils.isAnnotationMirrorOfType( mirror, Constants.MAPPED_SUPERCLASS ) else if ( TypeUtils.isAnnotationMirrorOfType( mirror, Constants.EMBEDDABLE ) ) {
|| TypeUtils.isAnnotationMirrorOfType( mirror, Constants.EMBEDDABLE ) ) {
alreadyExistingMetaEntity = context.getMetaEmbeddable( fqn ); alreadyExistingMetaEntity = context.getMetaEmbeddable( fqn );
} }
return alreadyExistingMetaEntity; return alreadyExistingMetaEntity;

View File

@ -219,7 +219,7 @@ public class XmlParser {
if ( context.containsMetaEntity( fqcn ) ) { if ( context.containsMetaEntity( fqcn ) ) {
context.logMessage( context.logMessage(
Diagnostic.Kind.WARNING, Diagnostic.Kind.WARNING,
fqcn + " was already processed once. Skipping second occurance." fqcn + " was already processed once. Skipping second occurrence."
); );
} }
context.addMetaEntity( fqcn, metaEntity ); context.addMetaEntity( fqcn, metaEntity );
@ -244,7 +244,7 @@ public class XmlParser {
if ( context.containsMetaEmbeddable( fqcn ) ) { if ( context.containsMetaEmbeddable( fqcn ) ) {
context.logMessage( context.logMessage(
Diagnostic.Kind.WARNING, Diagnostic.Kind.WARNING,
fqcn + " was already processed once. Skipping second occurance." fqcn + " was already processed once. Skipping second occurrence."
); );
} }
context.addMetaEmbeddable( fqcn, metaEntity ); context.addMetaEmbeddable( fqcn, metaEntity );
@ -271,10 +271,10 @@ public class XmlParser {
mappedSuperClass, pkg, getXmlMappedType( fqcn ), context mappedSuperClass, pkg, getXmlMappedType( fqcn ), context
); );
if ( context.containsMetaEmbeddable( fqcn ) ) { if ( context.containsMetaEntity( fqcn ) ) {
context.logMessage( context.logMessage(
Diagnostic.Kind.WARNING, Diagnostic.Kind.WARNING,
fqcn + " was already processed once. Skipping second occurance." fqcn + " was already processed once. Skipping second occurrence."
); );
} }
context.addMetaEntity( fqcn, metaEntity ); context.addMetaEntity( fqcn, metaEntity );