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, ang...@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

Reply via email to