cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Portier <...@outerthought.org>
Subject Re: AggregateField.java fieldsHaveValues()
Date Fri, 31 Oct 2003 10:33:44 GMT
according to this tracable history in cvs:
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/AggregateField.java.diff?r1=1.4&r2=1.5&diff_format=h

I would go for changing the comment based on bruno's change-log:

modified the fieldsHaveValues() method to check the values of all 
fields; if the values have been set programatically (such as done by the 
binding) then it could be that some fields have values while others don't.

I'll make the change and commit. Thx for noticing!
-marc=

Timothy Larson wrote:

> In AggregateField.java the method fieldsHaveValues() has a conflict
> with its comment.  The code only returns true if every field has a
> value.  The comment says differently.  Which is the desired behavior,
> what the code currently does or what the comment says it does?
> 
>     /**
>      * Returns true if their is at least one field which has a value.
>      */
>     private boolean fieldsHaveValues() {
>         Iterator fieldsIt = fields.iterator();
>         while (fieldsIt.hasNext()) {
>             Field field = (Field)fieldsIt.next();
>             if (field.getValue() == null)
>                 return false;
>         }
>         return true;
>     }
> 
> --Tim Larson
> 
> 
> __________________________________
> Do you Yahoo!?
> Exclusive Video Premiere - Britney Spears
> http://launch.yahoo.com/promos/britneyspears/
> 

-- 
Marc Portier                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at              http://radio.weblogs.com/0116284/
mpo@outerthought.org                              mpo@apache.org


Mime
View raw message