dev@javaserverfaces.java.net

Re: [REVIEW] Fixed small bug in isValueReference

From: Jason Lee <jason_at_steeplesoft.com>
Date: Wed, 30 May 2007 14:25:03 -0500

r=jdlee

On 5/30/07, Ken Paulsen <Ken.Paulsen_at_sun.com> wrote:
>
>
> Change bundle attached.
>
> Ken
>
>
> Changed check for EL expression to look for the closing '}' starting from
> the
> opening "#{". Previously it started from the beginning of the String
> which
> caused it to fail on a String such as: "{foo} #{foo}".
>
> SECTION: Modified Files
> ----------------------------
> M src/javax/faces/webapp/UIComponentTag.java
>
>
> SECTION: Diffs
> ----------------------------
> Index: src/javax/faces/webapp/UIComponentTag.java
> ===================================================================
> RCS file:
> /cvs/javaserverfaces-sources/jsf-api/src/javax/faces/webapp/UIComponentTag.java,v
> retrieving revision 1.62
> diff -u -r1.62 UIComponentTag.java
> --- src/javax/faces/webapp/UIComponentTag.java 30 May 2007 18:49:13
> -0000 1.62
> +++ src/javax/faces/webapp/UIComponentTag.java 30 May 2007 19:20:20 -0000
> @@ -147,8 +147,8 @@
> if (value == null) {
> throw new NullPointerException();
> }
> - if ((value.indexOf("#{") != -1) &&
> - (value.indexOf("#{") < value.indexOf('}'))) {
> + int start = value.indexOf("#{");
> + if ((start != -1) && (start < value.indexOf('}', start))) {
> return true;
> }
> return false;
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>



-- 
Jason Lee, SCJP
JSF RI Dev Team
http://blogs.steeplesoft.com