[seam-commits] Seam SVN: r9419 - branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/util.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Fri Oct 24 07:31:17 EDT 2008
Author: manaRH
Date: 2008-10-24 07:31:17 -0400 (Fri, 24 Oct 2008)
New Revision: 9419
Modified:
branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/util/Reflections.java
Log:
JBPAPP-1302
Modified: branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/util/Reflections.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/util/Reflections.java 2008-10-24 11:18:52 UTC (rev 9418)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/main/org/jboss/seam/util/Reflections.java 2008-10-24 11:31:17 UTC (rev 9419)
@@ -242,12 +242,22 @@
for (Method method: methods)
{
String methodName = method.getName();
- if ( methodName.matches("^(get|is).*") && method.getParameterTypes().length==0 )
+ if ( method.getParameterTypes().length==0 )
{
- if ( Introspector.decapitalize( methodName.substring(3) ).equals(name) )
+ if ( methodName.startsWith("get") )
{
- return method;
+ if ( Introspector.decapitalize( methodName.substring(3) ).equals(name) )
+ {
+ return method;
+ }
}
+ else if ( methodName.startsWith("is") )
+ {
+ if ( Introspector.decapitalize( methodName.substring(2) ).equals(name) )
+ {
+ return method;
+ }
+ }
}
}
throw new IllegalArgumentException("no such getter method: " + clazz.getName() + '.' + name);
More information about the seam-commits
mailing list