[jboss-cvs] JBossAS SVN: r109394 - projects/metadata/common/trunk/src/main/java/org/jboss/metadata/annotation/creator.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Nov 21 10:08:02 EST 2010
Author: jaikiran
Date: 2010-11-21 10:08:02 -0500 (Sun, 21 Nov 2010)
New Revision: 109394
Modified:
projects/metadata/common/trunk/src/main/java/org/jboss/metadata/annotation/creator/AbstractResourceProcessor.java
Log:
JBMETA-314 Set lookup value in metadata only if it is non-null
Modified: projects/metadata/common/trunk/src/main/java/org/jboss/metadata/annotation/creator/AbstractResourceProcessor.java
===================================================================
--- projects/metadata/common/trunk/src/main/java/org/jboss/metadata/annotation/creator/AbstractResourceProcessor.java 2010-11-19 22:42:46 UTC (rev 109393)
+++ projects/metadata/common/trunk/src/main/java/org/jboss/metadata/annotation/creator/AbstractResourceProcessor.java 2010-11-21 15:08:02 UTC (rev 109394)
@@ -264,7 +264,10 @@
if(annotation.mappedName().length() > 0)
ref.setMappedName(annotation.mappedName());
// set lookup
- ref.setLookupName(annotation.lookup());
+ if (annotation.lookup() != null && !annotation.lookup().trim().isEmpty())
+ {
+ ref.setLookupName(annotation.lookup());
+ }
Descriptions descriptions = ProcessorUtils.getDescription(annotation.description());
if(descriptions != null)
{
@@ -291,7 +294,10 @@
name = getName(element);
entry.setEnvEntryName(name);
// set lookup
- entry.setLookupName(annotation.lookup());
+ if (annotation.lookup() != null && !annotation.lookup().trim().isEmpty())
+ {
+ entry.setLookupName(annotation.lookup());
+ }
Descriptions descriptions = ProcessorUtils.getDescription(annotation.description());
if(descriptions != null)
entry.setDescriptions(descriptions);
@@ -319,7 +325,10 @@
if(annotation.mappedName().length() > 0)
ref.setMappedName(annotation.mappedName());
// set lookup
- ref.setLookupName(annotation.lookup());
+ if (annotation.lookup() != null && !annotation.lookup().trim().isEmpty())
+ {
+ ref.setLookupName(annotation.lookup());
+ }
ref.setAnnotatedElement(element);
DescriptionGroupMetaData dg = ProcessorUtils.getDescriptionGroup(annotation.description());
if(dg != null)
@@ -343,10 +352,13 @@
if(name.length() == 0)
name = getName(element);
ref.setMessageDestinationRefName(name);
- // set lookup
- ref.setLookupName(annotation.lookup());
if(annotation.mappedName().length() > 0)
ref.setMappedName(annotation.mappedName());
+ // set lookup
+ if (annotation.lookup() != null && !annotation.lookup().trim().isEmpty())
+ {
+ ref.setLookupName(annotation.lookup());
+ }
if(annotation.type() != Object.class)
ref.setType(annotation.type().getName());
else
@@ -369,10 +381,13 @@
if(name.length() == 0)
name = getName(element);
ref.setResourceEnvRefName(name);
- // set lookup
- ref.setLookupName(annotation.lookup());
if(annotation.mappedName().length() > 0)
ref.setMappedName(annotation.mappedName());
+ // set lookup
+ if (annotation.lookup() != null && !annotation.lookup().trim().isEmpty())
+ {
+ ref.setLookupName(annotation.lookup());
+ }
if(annotation.type() != Object.class)
ref.setType(annotation.type().getName());
else
More information about the jboss-cvs-commits
mailing list