brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <>
Subject [GitHub] brooklyn-server pull request #480: Config self reference fix
Date Fri, 17 Feb 2017 23:40:58 GMT
Github user aledsage commented on a diff in the pull request:
    --- Diff: core/src/main/java/org/apache/brooklyn/util/core/task/ ---
    @@ -62,6 +62,7 @@ public static boolean isInessential(Task<?> task) {
         public static boolean hasTag(Task<?> task, Object tag) {
    +        if (task==null) return false;
    --- End diff --
    On balance I'm fine with this because we use the same pattern in lots of places in Brooklyn.
But I think it's a bad pattern - it hides programming errors where null shouldn't have been
passed in, in exchange for a small number of callers getting to save a few characters by skipping
their null check. The former are so much more effort to fix that it's worth putting up with
the latter.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message