Skip to content

Commit

Permalink
Accidentally applied this patch, so reverting it now.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@719729 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Richard S. Hall committed Nov 21, 2008
1 parent acbaf55 commit 734d712
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions shell.tui/src/main/java/org/apache/felix/shell/tui/Activator.java
Expand Up @@ -110,39 +110,32 @@ public void stop(BundleContext context)
if (m_runnable != null)
{
m_runnable.stop();
m_thread.interrupt();
}
}

private class ShellTuiRunnable implements Runnable
{
private volatile boolean stop = false;

public void stop()
{
m_thread.interrupt();
stop = true;
}

public void run()
{
String line = null;
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

while (true)
while (!stop)
{
System.out.print("-> ");

try
{
while (System.in.available() == 0)
{
Thread.sleep(100);
}

line = in.readLine();
}
catch (InterruptedException ex)
{
// Silently exit, since this signifies that the bundle was stopped.
break;
}
catch (IOException ex)
{
System.err.println("ShellTUI: Error reading from stdin...exiting.");
Expand Down

0 comments on commit 734d712

Please sign in to comment.