[jboss-cvs] jboss-seam/src/main/org/jboss/seam ...
Gavin King
gavin.king at jboss.com
Sat Jun 2 20:51:56 EDT 2007
User: gavin
Date: 07/06/02 20:51:56
Modified: src/main/org/jboss/seam Component.java
Log:
exceptions
Revision Changes Path
1.249 +12 -2 jboss-seam/src/main/org/jboss/seam/Component.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Component.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/Component.java,v
retrieving revision 1.248
retrieving revision 1.249
diff -u -b -r1.248 -r1.249
--- Component.java 30 May 2007 21:53:10 -0000 1.248
+++ Component.java 3 Jun 2007 00:51:56 -0000 1.249
@@ -213,6 +213,15 @@
type = Seam.getComponentType( getBeanClass() );
interceptionType = Seam.getInterceptionType (getBeanClass() );
+ if ( getBeanClass().isInterface() )
+ {
+ throw new IllegalArgumentException("component class is an interface: " + name);
+ }
+ if ( Modifier.isAbstract( getBeanClass().getModifiers() ) )
+ {
+ throw new IllegalArgumentException("component class is abstract: " + name);
+ }
+
initNamespaces(componentName, applicationContext);
checkScopeForComponentType();
@@ -1492,7 +1501,8 @@
}
}
- if ( result.size() == 0 ) {
+ if ( result.isEmpty() )
+ {
for ( Class iface: clazz.getInterfaces() )
{
if ( !isExcludedLocalInterfaceName( iface.getName() ) )
More information about the jboss-cvs-commits
mailing list