jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig <mdue...@apache.org>
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:37:29 GMT


On 6.2.13 10:34, Angela Schreiber wrote:
> 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

Yes I share these concerns. Javadoc is also fine.

Michael

>
> 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