myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@gmail.com>
Subject Re: MockCompositeValueExpression
Date Fri, 24 Feb 2012 23:29:30 GMT
On Fri, Feb 24, 2012 at 5:23 PM, Kito Mann <kito.mann@virtua.com> wrote:
> On Fri, Feb 24, 2012 at 6:21 PM, Matt Benson <gudnabrsam@gmail.com> wrote:
>>
>> On Fri, Feb 24, 2012 at 5:10 PM, Kito Mann <kito.mann@virtua.com> wrote:
>> > Does anyone know why the constructor to MockCompositeValueExpression in
>> > MyFaces-Tests calls the superclass's constructor like so?
>> >
>> > super("#{}", expectedType);
>> >
>> > I'm thinking this is a bug, and that it should pass the actual
>> > expression:
>> >
>> > super(expression, expectedType);
>> >
>> > Let me know if I'm not missing something, and I'll create a JIRA issue.
>>
>> Kito,
>>  The super constructor will attempt to parse what it is given, but
>> since a composite expression may embed multiple #{...} constructs
>> among literal text sequences, this parsing would fail.  It is for this
>> reason that the super constructor is passed a dummy expression.
>>
>
> This makes sense. However, isLiteral() is returning false in this case when
> it shouldn't, and I believe getExpressionString() is hardcoded to "#{}" as
> well.
>

Ah, then it sounds like the patch should compensate for these.  :)

Matt

>>
>> Thanks,
>> Matt
>>
>> > ___
>> >
>> > Kito D. Mann | twitter: kito99 | Author, JSF in Action
>> > Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and
>> > consulting
>> > http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
>> > twitter:
>> > jsfcentral
>> > +1 203-404-4848 x3
>> >
>> > * Listen to the latest headlines in the JSF and Java EE
>> >
>> > newscast: http://blogs.jsfcentral.com/roller/editorsdesk/category/JSF+and+Java+EE+Newscast
>> > * Sign up for the JSFCentral newsletter:
>> > http://oi.vresp.com/?fid=ac048d0e17
>> >
>
>

Mime
View raw message