Closed Blemicek closed 10 years ago
Is there any special reason to use this testing:
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(ps.getErrorStream())); String lineErr; String linePrev = null; while ((lineErr = bufferedReader.readLine()) != null) { linePrev = lineErr; } //... if ((correctRun) && ((linePrev != null) && (linePrev.endsWith("Recognizer saved.")))) { LOG.info("Training done"); this.bindModel(modelLocation); } else { LOG.error("Training failed: {}", linePrev); }
instead of simple:
int exitCode = ps.exitValue(); if ((correctRun) && (exitCode == 0) { //... } // or something like that
?
This is because Training failed doesn't tell much about error, so for testing purposes, i added this functionality.
Ok
Is there any special reason to use this testing:
instead of simple:
?