[jboss-user] [JBoss Seam] - org.jboss.seam.framework Query too case sensitive

codelion do-not-reply at jboss.com
Tue Jan 16 19:11:51 EST 2007


Method getCountEjbql() could use an intermediate variable String ejbqlLowerCase = ejbql.toLowerCase() and use that ejbqlLowerCase for the two indexOf calls.

That lower case I'm sure about.

Further, it might be better to have extra spaces to make that an indexOf(" order ") to avoid mistaking orderNumber and such or use a regular expression (tabs, line breaks, parentheses, etc).  If you need to roll those regular expression, ask me, I might find to do them right.

Maybe also indexOf(" from ") or a regular expression there too.  Precompile the regular expression into a static variable, is that ok here?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4002527#4002527

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4002527



More information about the jboss-user mailing list