@@ -114,26 +114,28 @@ public String[] toParameters(
114114 boolean parallelize ,
115115 boolean insecureConnection ) {
116116 StringBuilder finalParams = new StringBuilder ();
117- for (Parameter param : parameterList ) {
118- if (supportsInsecure ()) {
119- if ((insecureConnection && param .getType () == ParameterType .CA_CERTIFICATE )
117+ if (parameterList != null ) {
118+ for (Parameter param : parameterList ) {
119+ if (supportsInsecure ()) {
120+ if ((insecureConnection && param .getType () == ParameterType .CA_CERTIFICATE )
120121 || (!insecureConnection && param .getType () == ParameterType .INSECURE )) {
121- // do not add CA param if we use insecure, do not add insecure
122- // if not wanted
123- continue ;
122+ // do not add CA param if we use insecure, do not add insecure
123+ // if not wanted
124+ continue ;
125+ }
124126 }
125- }
126127
127- if (!parallelize && param .getType () == ParameterType .PARALLELIZE ) {
128- // do not add parallelize if not wanted
129- continue ;
130- }
131- if (param .getCmdParameter ().equals ("" )) {
132- // do not add empty commands that cause a blank space
133- continue ;
128+ if (!parallelize && param .getType () == ParameterType .PARALLELIZE ) {
129+ // do not add parallelize if not wanted
130+ continue ;
131+ }
132+ if (param .getCmdParameter ().equals ("" )) {
133+ // do not add empty commands that cause a blank space
134+ continue ;
135+ }
136+ finalParams .append (param .getCmdParameter ());
137+ finalParams .append (" " );
134138 }
135- finalParams .append (param .getCmdParameter ());
136- finalParams .append (" " );
137139 }
138140 if (additionalParameters != null ) {
139141 finalParams .append (additionalParameters );
0 commit comments