Makes sense.

On Apr 3, 2013, at 8:36 AM, Ignasi Barrera wrote:


In scriptbuilder/src/main/java/org/jclouds/scriptbuilder/statements/chef/ChefSolo.java:

> @@ -271,7 +271,7 @@ public ChefSolo build() {
>     private RunList runlist;
>     private final InstallChefGems installChefGems;
>
> -   public ChefSolo(Optional<String> fileCachePath, Optional<String> rolePath, Optional<String> databagPath,
> +   protected ChefSolo(Optional<String> fileCachePath, Optional<String> rolePath, Optional<String> databagPath,


They are not required by default. You could run chef-solo without configuring those attributes, and Chef will use the /var/chef directory by default.

What I wanted to express in the constructor is that those values are not required to run solo (there are defaults), allowing users to pass an absent to rely on the defaults. That's why I used Optional there.

I understand what you mean, because the code in the constructor that reads those arguments, could just omit them if absent, but I preferred to explictly set the default chef-solo values, to help users understand what is going on. In the end the behavior will be the same, but it is easier to follow up and debug what is going on if default values re explicit in code.

Makes sense?

—
Reply to this email directly or view it on GitHub<https://github.com/jclouds/jclouds/pull/1487/files#r3636525>.