|
From: Markus B. <mba...@us...> - 2005-09-16 20:51:38
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14371/src/org/rubypeople/rdt/debug/core/tests Modified Files: OutputRedirectorThread.java Log Message: stores lastLine for better error reporting from TC_DebuggerCommunicationTest Index: OutputRedirectorThread.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.debug.core.tests/src/org/rubypeople/rdt/debug/core/tests/OutputRedirectorThread.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** OutputRedirectorThread.java 14 Jan 2003 21:59:03 -0000 1.1 --- OutputRedirectorThread.java 16 Sep 2005 20:51:30 -0000 1.2 *************** *** 8,11 **** --- 8,12 ---- public class OutputRedirectorThread extends Thread { private InputStream inputStream; + private String lastLine = "No output." ; public OutputRedirectorThread(InputStream aInputStream) { inputStream = aInputStream; *************** *** 15,23 **** System.out.println("OutputRedirectorThread started."); BufferedReader br = new BufferedReader(new InputStreamReader(inputStream)); ! ! String line; try { while ((line = br.readLine()) != null) { System.out.println("RUBY: " + line); } } catch (IOException e) { --- 16,24 ---- System.out.println("OutputRedirectorThread started."); BufferedReader br = new BufferedReader(new InputStreamReader(inputStream)); ! String line ; try { while ((line = br.readLine()) != null) { System.out.println("RUBY: " + line); + lastLine = line ; } } catch (IOException e) { *************** *** 26,28 **** --- 27,33 ---- System.out.println("OutputRedirectorThread stopped."); } + + public String getLastLine() { + return lastLine ; + } } |