public String ensureValidExpression ( String dataSource , String attrName , String errorId ) throws JspException { try { boolean isExpr = isExpression ( dataSource ) ; // @perf: if the isExpr call fails, this is an error condition, and the containsExpression // call cost is irrelevant if ( ! isExpr && containsExpression ( dataSource ) ) { String s = Bundle . getString ( errorId , new Object [ ] { dataSource } ) ; _tag . registerTagError ( s , null ) ; return null ; } if ( ! isExpr ) { String s = Bundle . getString ( errorId , new Object [ ] { dataSource } ) ; _tag . registerTagError ( s , null ) ; return null ; } } catch ( Exception e ) { // pass throw JspExceptions if ( e instanceof JspException ) throw ( JspException ) e ; String s = Bundle . getString ( errorId , new Object [ ] { dataSource } ) ; _tag . registerTagError ( s , e ) ; return null ; } return dataSource ; }
Ensure that the passed in data source is a valid expression .