[seam-commits] Seam SVN: r9005 - trunk/src/main/org/jboss/seam/util.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Sep 17 05:42:36 EDT 2008
Author: pete.muir at jboss.org
Date: 2008-09-17 05:42:36 -0400 (Wed, 17 Sep 2008)
New Revision: 9005
Modified:
trunk/src/main/org/jboss/seam/util/Reflections.java
Log:
JBSEAM-3392
Modified: trunk/src/main/org/jboss/seam/util/Reflections.java
===================================================================
--- trunk/src/main/org/jboss/seam/util/Reflections.java 2008-09-17 09:42:08 UTC (rev 9004)
+++ trunk/src/main/org/jboss/seam/util/Reflections.java 2008-09-17 09:42:36 UTC (rev 9005)
@@ -247,12 +247,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