grok assembly exe was hanging, reordered so input stream was processed before error stream to resolve the issue.

This commit is contained in:
Jeremy Long
2015-11-24 05:34:34 -05:00
parent 5f8f156bee
commit 51d81fab5d

View File

@@ -118,6 +118,9 @@ public class AssemblyAnalyzer extends AbstractFileTypeAnalyzer {
Document doc = null; Document doc = null;
try { try {
final Process proc = pb.start(); final Process proc = pb.start();
doc = builder.parse(proc.getInputStream());
// Try evacuating the error stream // Try evacuating the error stream
final String errorStream = IOUtils.toString(proc.getErrorStream(), "UTF-8"); final String errorStream = IOUtils.toString(proc.getErrorStream(), "UTF-8");
if (null != errorStream && !errorStream.isEmpty()) { if (null != errorStream && !errorStream.isEmpty()) {
@@ -125,8 +128,6 @@ public class AssemblyAnalyzer extends AbstractFileTypeAnalyzer {
} }
int rc = 0; int rc = 0;
doc = builder.parse(proc.getInputStream());
try { try {
rc = proc.waitFor(); rc = proc.waitFor();
} catch (InterruptedException ie) { } catch (InterruptedException ie) {