From db3252d8228da4662275e92fe262c1da9703039f Mon Sep 17 00:00:00 2001 From: "a.vasin" Date: Sat, 1 Jun 2019 12:55:13 +0400 Subject: [PATCH] #101 event service edited --- src/main/java/ru/ulstu/paper/service/LatexService.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/ru/ulstu/paper/service/LatexService.java b/src/main/java/ru/ulstu/paper/service/LatexService.java index 27dfa1e..82dd1ba 100644 --- a/src/main/java/ru/ulstu/paper/service/LatexService.java +++ b/src/main/java/ru/ulstu/paper/service/LatexService.java @@ -41,6 +41,12 @@ public class LatexService { Process process = processBuilder.start(); InputStreamReader inputStreamReader = new InputStreamReader(process.getInputStream()); + try (BufferedReader bufferedReader = new BufferedReader(inputStreamReader)) { + while ((bufferedReader.readLine()) != null) { + // + } + } + int exitCode = process.waitFor(); if (exitCode != 0) { errorMessage = message + " Exit value of the process: " + exitCode;