handleIsNeedsFileUpload incorrect conditional variable during inner iteration
-----------------------------------------------------------------------------

         Key: JSF-39
         URL: http://jira.andromda.org/browse/JSF-39
     Project: JSF cartridge
        Type: Bug

    Reporter: Javier Adorno
 Assigned to: Chad Brandon 


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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.andromda.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

Reply via email to