protected static boolean validFieldName ( String fieldName ) { String [ ] parts = fieldName . split ( "\\." ) ; for ( String part : parts ) { if ( part . startsWith ( "$" ) ) { String msg = String . format ( "Field names cannot start with a $ in field %s" , part ) ; logger . log ( Level . SEVERE , msg ) ; return false ; } } return true ; }
Validate the field name string is usable .