jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@adobe.com>
Subject Re: svn commit: r1442882 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/security/privilege/ main/java/org/apache/jackrabbit/oak/util/ test/java/org/apache/jackrabbit/oak/security/user/
Date Wed, 06 Feb 2013 10:34:59 GMT
hi michael

passing in a default parameter for method that returns boolean
looks pretty awkward to me and i somewhat dislike the lengthy
names because the of the utility was to make the code readable.
but i will add some javadoc both in TreeUtil and in NodeUtil.
angela

On 2/6/13 11:28 AM, Michael Dürig wrote:
>
>
> On 6.2.13 10:03, angela@apache.org wrote:
>> @@ -59,4 +60,9 @@ public final class TreeUtil {
>>                return null;
>>            }
>>        }
>> +
>> +    public static boolean getBoolean(Tree tree, String propertyName) {
>> +        PropertyState property = tree.getProperty(propertyName);
>> +        return property != null&&  !property.isArray()&&  property.getValue(BOOLEAN);
>> +    }
>>    }
>
> Shouldn't we call this method getBooleanOrFalse? Alternatively we could
> leave it as is but add a defaultValue parameter.
>
> Michael

Mime
View raw message