brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neykov <>
Subject [GitHub] brooklyn-ui pull request #34: Use new pinned and constraints flag returned b...
Date Fri, 30 Sep 2016 15:52:16 GMT
Github user neykov commented on a diff in the pull request:
    --- Diff: src/main/webapp/assets/js/view/application-add-wizard.js ---
    @@ -680,10 +680,12 @@ define([
                     if (catalogEntryItem!=null && catalogEntryItem.config!=null)
                         var that = this
    -                    _.each(catalogEntryItem.config, function (cfg) {
    -                        if (cfg.priority !== undefined) {
    +                    _.chain(catalogEntryItem.config).sortBy(function (cfg){
    +                        return !isNaN(cfg.priority) ? cfg.priority : 99999;
    --- End diff --
    Nitpick, The REST API is configured with `@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)`
so `null` values server-side won't be included in the response (will be `undefined`). Given
that the original check `cfg.priority !== undefined` is more explicit - for example `isNaN(null)
== false` so not really clear what's the purpose of the check when reading the code.

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