mirror of https://github.com/apache/jclouds.git
Options use boolean primitive instead of object
The Boolean object makes passing null value possible, which would cause NPE.
This commit is contained in:
parent
867b7f52e4
commit
be6ce141b6
|
@ -25,8 +25,8 @@ public class AttachOptions extends BaseHttpRequestOptions {
|
|||
* When TTY is disabled, the stream is multiplexed to separate stdout and stderr.
|
||||
* @return AttachOptions
|
||||
*/
|
||||
public AttachOptions stream(Boolean stream) {
|
||||
this.queryParameters.put("stream", stream.toString());
|
||||
public AttachOptions stream(boolean stream) {
|
||||
this.queryParameters.put("stream", String.valueOf(stream));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -34,8 +34,8 @@ public class AttachOptions extends BaseHttpRequestOptions {
|
|||
* @param logs require logs to be attached. Default false.
|
||||
* @return AttachOptions
|
||||
*/
|
||||
public AttachOptions logs(Boolean logs) {
|
||||
this.queryParameters.put("logs", logs.toString());
|
||||
public AttachOptions logs(boolean logs) {
|
||||
this.queryParameters.put("logs", String.valueOf(logs));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -43,8 +43,8 @@ public class AttachOptions extends BaseHttpRequestOptions {
|
|||
* @param stdin if stream=true, attach to stdin. Default false
|
||||
* @return AttachOptions
|
||||
*/
|
||||
public AttachOptions stdin(Boolean stdin) {
|
||||
this.queryParameters.put("stdin", stdin.toString());
|
||||
public AttachOptions stdin(boolean stdin) {
|
||||
this.queryParameters.put("stdin", String.valueOf(stdin));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -52,8 +52,8 @@ public class AttachOptions extends BaseHttpRequestOptions {
|
|||
* @param stdout if logs=true, return stdout log, if stream=true, attach to stdout. Default false
|
||||
* @return
|
||||
*/
|
||||
public AttachOptions stdout(Boolean stdout) {
|
||||
this.queryParameters.put("stdout", stdout.toString());
|
||||
public AttachOptions stdout(boolean stdout) {
|
||||
this.queryParameters.put("stdout", String.valueOf(stdout));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -62,8 +62,8 @@ public class AttachOptions extends BaseHttpRequestOptions {
|
|||
* @param stderr if logs=true, return stderr log, if stream=true, attach to stderr. Default false
|
||||
* @return
|
||||
*/
|
||||
public AttachOptions stderr(Boolean stderr) {
|
||||
this.queryParameters.put("stderr", stderr.toString());
|
||||
public AttachOptions stderr(boolean stderr) {
|
||||
this.queryParameters.put("stderr", String.valueOf(stderr));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ public class AttachOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see org.jclouds.docker.options.AttachOptions#stream
|
||||
*/
|
||||
public static AttachOptions stream(Boolean stream) {
|
||||
public static AttachOptions stream(boolean stream) {
|
||||
AttachOptions options = new AttachOptions();
|
||||
return options.stream(stream);
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ public class AttachOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see org.jclouds.docker.options.AttachOptions#logs(Boolean)
|
||||
*/
|
||||
public static AttachOptions logs(Boolean logs) {
|
||||
public static AttachOptions logs(boolean logs) {
|
||||
AttachOptions options = new AttachOptions();
|
||||
return options.logs(logs);
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ public class AttachOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see org.jclouds.docker.options.AttachOptions#stdin(Boolean)
|
||||
*/
|
||||
public static AttachOptions stdin(Boolean stdin) {
|
||||
public static AttachOptions stdin(boolean stdin) {
|
||||
AttachOptions options = new AttachOptions();
|
||||
return options.stdin(stdin);
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ public class AttachOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see org.jclouds.docker.options.AttachOptions#stdout(Boolean)
|
||||
*/
|
||||
public static AttachOptions stdout(Boolean stdout) {
|
||||
public static AttachOptions stdout(boolean stdout) {
|
||||
AttachOptions options = new AttachOptions();
|
||||
return options.stdout(stdout);
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ public class AttachOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see org.jclouds.docker.options.AttachOptions#stderr(Boolean)
|
||||
*/
|
||||
public static AttachOptions stderr(Boolean stderr) {
|
||||
public static AttachOptions stderr(boolean stderr) {
|
||||
AttachOptions options = new AttachOptions();
|
||||
return options.stderr(stderr);
|
||||
}
|
||||
|
|
|
@ -25,13 +25,13 @@ public class BuildOptions extends BaseHttpRequestOptions {
|
|||
return this;
|
||||
}
|
||||
|
||||
public BuildOptions verbose(Boolean verbose) {
|
||||
this.queryParameters.put("verbose", verbose.toString());
|
||||
public BuildOptions verbose(boolean verbose) {
|
||||
this.queryParameters.put("verbose", String.valueOf(verbose));
|
||||
return this;
|
||||
}
|
||||
|
||||
public BuildOptions nocache(Boolean nocache) {
|
||||
this.queryParameters.put("nocache", nocache.toString());
|
||||
public BuildOptions nocache(boolean nocache) {
|
||||
this.queryParameters.put("nocache", String.valueOf(nocache));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ public class BuildOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see BuildOptions#verbose(Boolean)
|
||||
*/
|
||||
public static BuildOptions verbose(Boolean verbose) {
|
||||
public static BuildOptions verbose(boolean verbose) {
|
||||
BuildOptions options = new BuildOptions();
|
||||
return options.verbose(verbose);
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ public class BuildOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see BuildOptions#nocache(Boolean)
|
||||
*/
|
||||
public static BuildOptions nocache(Boolean nocache) {
|
||||
public static BuildOptions nocache(boolean nocache) {
|
||||
BuildOptions options = new BuildOptions();
|
||||
return options.nocache(nocache);
|
||||
}
|
||||
|
|
|
@ -20,13 +20,13 @@ import org.jclouds.http.options.BaseHttpRequestOptions;
|
|||
|
||||
public class DeleteImageOptions extends BaseHttpRequestOptions {
|
||||
|
||||
public DeleteImageOptions force(Boolean force) {
|
||||
this.queryParameters.put("force", force.toString());
|
||||
public DeleteImageOptions force(boolean force) {
|
||||
this.queryParameters.put("force", String.valueOf(force));
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeleteImageOptions noPrune(Boolean noPrune) {
|
||||
this.queryParameters.put("noPrune", noPrune.toString());
|
||||
public DeleteImageOptions noPrune(boolean noPrune) {
|
||||
this.queryParameters.put("noPrune", String.valueOf(noPrune));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ public class DeleteImageOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see DeleteImageOptions#force
|
||||
*/
|
||||
public static DeleteImageOptions force(Boolean force) {
|
||||
public static DeleteImageOptions force(boolean force) {
|
||||
DeleteImageOptions options = new DeleteImageOptions();
|
||||
return options.force(force);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public class DeleteImageOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see DeleteImageOptions#noPrune
|
||||
*/
|
||||
public static DeleteImageOptions noPrune(Boolean noPrune) {
|
||||
public static DeleteImageOptions noPrune(boolean noPrune) {
|
||||
DeleteImageOptions options = new DeleteImageOptions();
|
||||
return options.noPrune(noPrune);
|
||||
}
|
||||
|
|
|
@ -20,8 +20,8 @@ import org.jclouds.http.options.BaseHttpRequestOptions;
|
|||
|
||||
public class ListContainerOptions extends BaseHttpRequestOptions {
|
||||
|
||||
public ListContainerOptions all(Boolean all) {
|
||||
this.queryParameters.put("all", all.toString());
|
||||
public ListContainerOptions all(boolean all) {
|
||||
this.queryParameters.put("all", String.valueOf(all));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class ListContainerOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListContainerOptions#all
|
||||
*/
|
||||
public static ListContainerOptions all(Boolean all) {
|
||||
public static ListContainerOptions all(boolean all) {
|
||||
ListContainerOptions options = new ListContainerOptions();
|
||||
return options.all(all);
|
||||
}
|
||||
|
|
|
@ -20,8 +20,8 @@ import org.jclouds.http.options.BaseHttpRequestOptions;
|
|||
|
||||
public class ListImageOptions extends BaseHttpRequestOptions {
|
||||
|
||||
public ListImageOptions all(Boolean all) {
|
||||
this.queryParameters.put("all", all.toString());
|
||||
public ListImageOptions all(boolean all) {
|
||||
this.queryParameters.put("all", String.valueOf(all));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ public class ListImageOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListImageOptions#all
|
||||
*/
|
||||
public static ListImageOptions all(Boolean all) {
|
||||
public static ListImageOptions all(boolean all) {
|
||||
ListImageOptions options = new ListImageOptions();
|
||||
return options.all(all);
|
||||
}
|
||||
|
|
|
@ -20,13 +20,13 @@ import org.jclouds.http.options.BaseHttpRequestOptions;
|
|||
|
||||
public class RemoveContainerOptions extends BaseHttpRequestOptions {
|
||||
|
||||
public RemoveContainerOptions verbose(Boolean verbose) {
|
||||
this.queryParameters.put("verbose", verbose.toString());
|
||||
public RemoveContainerOptions verbose(boolean verbose) {
|
||||
this.queryParameters.put("verbose", String.valueOf(verbose));
|
||||
return this;
|
||||
}
|
||||
|
||||
public RemoveContainerOptions force(Boolean force) {
|
||||
this.queryParameters.put("force", force.toString());
|
||||
public RemoveContainerOptions force(boolean force) {
|
||||
this.queryParameters.put("force", String.valueOf(force));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -36,8 +36,8 @@ public class RemoveContainerOptions extends BaseHttpRequestOptions {
|
|||
* @param volume If set to true the volume associated to the container will be removed.
|
||||
* Otherwise it will not be removed.
|
||||
*/
|
||||
public RemoveContainerOptions volume(Boolean volume) {
|
||||
this.queryParameters.put("v", volume.toString());
|
||||
public RemoveContainerOptions volume(boolean volume) {
|
||||
this.queryParameters.put("v", String.valueOf(volume));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ public class RemoveContainerOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see RemoveContainerOptions#verbose
|
||||
*/
|
||||
public static RemoveContainerOptions verbose(Boolean verbose) {
|
||||
public static RemoveContainerOptions verbose(boolean verbose) {
|
||||
RemoveContainerOptions options = new RemoveContainerOptions();
|
||||
return options.verbose(verbose);
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class RemoveContainerOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see RemoveContainerOptions#force
|
||||
*/
|
||||
public static RemoveContainerOptions force(Boolean force) {
|
||||
public static RemoveContainerOptions force(boolean force) {
|
||||
RemoveContainerOptions options = new RemoveContainerOptions();
|
||||
return options.force(force);
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ public class RemoveContainerOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see RemoveContainerOptions#volume
|
||||
*/
|
||||
public static RemoveContainerOptions volume(Boolean volume) {
|
||||
public static RemoveContainerOptions volume(boolean volume) {
|
||||
RemoveContainerOptions options = new RemoveContainerOptions();
|
||||
return options.volume(volume);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue