@@ -55,7 +55,7 @@ public ProcessHandler(String[] cmd, File workingDir) {
5555 }
5656
5757 /**
58- * Set the log that standard out of process will be written to .
58+ * Set the file to which standard out of the process should be written.
5959 *
6060 * @param log the stdout log file
6161 */
@@ -206,8 +206,7 @@ public void exec(List<String> linesToPipeToStdin) throws ScriptRunnerException {
206206 LOGGER .entering (CLASS , METHOD );
207207
208208 if (waitHandler == null ) {
209- ScriptRunnerException sre =
210- new ScriptRunnerException ("WLSDPLY-01201" , this .toString ());
209+ ScriptRunnerException sre = new ScriptRunnerException ("WLSDPLY-01201" , this .toString ());
211210 LOGGER .throwing (CLASS , METHOD , sre );
212211 throw sre ;
213212 }
@@ -220,21 +219,22 @@ public void exec(List<String> linesToPipeToStdin) throws ScriptRunnerException {
220219 process = procBuilder .start ();
221220 } catch (IOException ioe ) {
222221 ScriptRunnerException sre =
223- new ScriptRunnerException ("WLSDPLY-01203" , ioe , this .toString (), ioe .getLocalizedMessage ());
222+ new ScriptRunnerException ("WLSDPLY-01203" , ioe , this .toString (), ioe .getLocalizedMessage ());
224223 LOGGER .throwing (CLASS , METHOD , sre );
225224 throw sre ;
226225 }
227226
228227 if (linesToPipeToStdin != null && !linesToPipeToStdin .isEmpty ()) {
229228 try (BufferedWriter writer =
230- new BufferedWriter (new OutputStreamWriter (process .getOutputStream (), DEFAULT_CHARSET ))) {
229+ new BufferedWriter (new OutputStreamWriter (process .getOutputStream (), DEFAULT_CHARSET ))) {
230+
231231 for (String line : linesToPipeToStdin ) {
232232 writer .write (line );
233233 writer .newLine ();
234234 }
235235 } catch (IOException ioe ) {
236236 ScriptRunnerException sre =
237- new ScriptRunnerException ("WLSDPLY-01204" , ioe , this .toString (), ioe .getLocalizedMessage ());
237+ new ScriptRunnerException ("WLSDPLY-01204" , ioe , this .toString (), ioe .getLocalizedMessage ());
238238 LOGGER .throwing (CLASS , METHOD , sre );
239239 throw sre ;
240240 }
@@ -257,7 +257,7 @@ public void exec(List<String> linesToPipeToStdin) throws ScriptRunnerException {
257257 process .destroy ();
258258 }
259259 ScriptRunnerException sre =
260- new ScriptRunnerException ("WLSDPLY-01205" , this .toString (), elapsed , timeout );
260+ new ScriptRunnerException ("WLSDPLY-01205" , this .toString (), elapsed , timeout );
261261 LOGGER .throwing (CLASS , METHOD , sre );
262262 throw sre ;
263263 }
@@ -305,7 +305,8 @@ public String toString() {
305305 public void run () {
306306 PrintStream logWriter = null ;
307307 try (BufferedReader reader =
308- new BufferedReader (new InputStreamReader (process .getInputStream (), DEFAULT_CHARSET ))) {
308+ new BufferedReader (new InputStreamReader (process .getInputStream (), DEFAULT_CHARSET ))) {
309+
309310 if (logFile != null ) {
310311 FileOutputStream fos = new FileOutputStream (logFile , appendFlag );
311312 logWriter = new PrintStream (fos , true , StandardCharsets .UTF_8 .toString ());
0 commit comments