cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Larson <timlarsonw...@yahoo.com>
Subject AggregateField.java fieldsHaveValues()
Date Thu, 30 Oct 2003 14:32:41 GMT
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/

Mime
View raw message