empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject svn commit: r1385292 - /empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/DBELResolver.java
Date Sun, 16 Sep 2012 16:00:28 GMT
Author: doebele
Date: Sun Sep 16 16:00:28 2012
New Revision: 1385292

URL: http://svn.apache.org/viewvc?rev=1385292&view=rev
Log:
EMPIREDB-157 
JSF2 DB db-el-resolver: only check for record fields for properties with a capital first letter

Modified:
    empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/DBELResolver.java

Modified: empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/DBELResolver.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/DBELResolver.java?rev=1385292&r1=1385291&r2=1385292&view=diff
==============================================================================
--- empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/DBELResolver.java
(original)
+++ empire-db/trunk/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/app/DBELResolver.java
Sun Sep 16 16:00:28 2012
@@ -96,11 +96,14 @@ public class DBELResolver extends ELReso
         else if (base instanceof RecordData)
         {   // Lookup RowSet           
             String field= StringUtils.toString(property);
+            // field must start with a capital Letter
+            if (field==null || field.length()==0 || field.charAt(0)<'A' || field.charAt(0)>'Z')
+                return null;
+            // try to find field
             int index = ((Record)base).getFieldIndex(field);
             if (index<0)
             {   // not a field, it may be a property
-                if (log.isDebugEnabled())
-                    log.debug("ELResolver warning: field '{}' not found in record .", field);
+                log.warn("ELResolver warning: field '{}' not found in record .", field);
                 // not resolved, continue search
                 return null; 
             }



Mime
View raw message