[jboss-cvs] JBossAS SVN: r94956 - projects/metadata/web/trunk/src/main/java/org/jboss/metadata/annotation/creator/web.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 15 12:35:21 EDT 2009
Author: remy.maucherat at jboss.com
Date: 2009-10-15 12:35:21 -0400 (Thu, 15 Oct 2009)
New Revision: 94956
Modified:
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/annotation/creator/web/WebFilterProcessor.java
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/annotation/creator/web/WebServletProcessor.java
Log:
- Default to class name for empty names in annotations.
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/annotation/creator/web/WebFilterProcessor.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/annotation/creator/web/WebFilterProcessor.java 2009-10-15 16:15:49 UTC (rev 94955)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/annotation/creator/web/WebFilterProcessor.java 2009-10-15 16:35:21 UTC (rev 94956)
@@ -67,7 +67,10 @@
WebMetaData metaData = new WebMetaData();
FiltersMetaData filters = new FiltersMetaData();
FilterMetaData filter = new FilterMetaData();
- filter.setName(webFilter.filterName());
+ if (webFilter.filterName().length() == 0)
+ filter.setName(element.getName());
+ else
+ filter.setName(webFilter.filterName());
filter.setAsyncSupported(webFilter.asyncSupported());
if (webFilter.initParams() != null)
{
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/annotation/creator/web/WebServletProcessor.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/annotation/creator/web/WebServletProcessor.java 2009-10-15 16:15:49 UTC (rev 94955)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/annotation/creator/web/WebServletProcessor.java 2009-10-15 16:35:21 UTC (rev 94956)
@@ -66,7 +66,10 @@
WebMetaData metaData = new WebMetaData();
ServletsMetaData servlets = new ServletsMetaData();
ServletMetaData servlet = new ServletMetaData();
- servlet.setName(webServlet.name());
+ if (webServlet.name().length() == 0)
+ servlet.setName(element.getName());
+ else
+ servlet.setName(webServlet.name());
if (webServlet.loadOnStartup() > 0)
servlet.setLoadOnStartup(webServlet.loadOnStartup());
servlet.setAsyncSupported(webServlet.asyncSupported());
More information about the jboss-cvs-commits
mailing list