History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: JSF-39
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Chad Brandon
Reporter: Javier Adorno
Votes: (View)
Watchers: (View)
Operations

If you were logged in you would be able to see more operations.
JSF cartridge

handleIsNeedsFileUpload incorrect conditional variable during inner iteration

Created: 07/Dec/07 08:22 PM   Updated: 07/Dec/07 08:22 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None


 Description   
Arises when there is more that one object coming out of a FrontEndView.

This is the current method.

    protected boolean handleIsNeedsFileUpload()
    {
        if(this.getParameters().size() == 0)
            return false;
            
        for (final Iterator iterator = this.getParameters().iterator(); iterator.hasNext();)
        {
            final Object object = iterator.next();
            if (object instanceof JSFParameter){
                final JSFParameter parameter = (JSFParameter)object;
                if(parameter.isInputFile())
                   return true;
                if(parameter.isComplex()){
                    for(final Iterator attributes = parameter.getAttributes().iterator(); iterator.hasNext();)
                        if(((JSFAttribute)attributes.next()).isInputFile())
                            return true;
                }
            }
        }
        return false;
    }

In the inner for cycle the conditional variable is iterator.hasNext() and should be attributes.hasNext()

This change solves the issue

 All   Comments   Change History      Sort Order:
There are no comments yet on this issue.