Uploaded image for project: 'Myriad'
  1. Myriad
  2. MYRIAD-198

Remove optionals when sane defaults are available

    XMLWordPrintableJSON

Details

    Description

      Currently we overuse Optionals in the config and then use an or method in various factories later. In many cases having the configuration return a default when the parameter was specified would create cleaner code. For instance:

      Optional<Boolean> getCgroups() {
      Optional.fromNullable(cgroups);
      }

      vs

      Boolean getCgroups() {
      return cgroups != null ? cgroups : false;
      }

      Attachments

        Issue Links

          Activity

            People

              hokiegeek2 John Yost
              darinj Darin J
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: