Skip to content

Commit

Permalink
Do not close the System.in stream
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet authored and michael-o committed Sep 11, 2021
1 parent 3c81b90 commit 58cbbe0
Showing 1 changed file with 1 addition and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable;
import org.codehaus.plexus.components.interactivity.AbstractInputHandler;

import java.io.BufferedReader;
import java.io.IOException;
Expand All @@ -41,7 +39,7 @@
*/
public class DefaultInputHandler
extends AbstractInputHandler
implements Initializable, Disposable
implements Initializable
{
private BufferedReader consoleReader;

Expand All @@ -62,16 +60,4 @@ public void initialize()
{
consoleReader = new BufferedReader( new InputStreamReader( System.in ) );
}

public void dispose()
{
try
{
consoleReader.close();
}
catch ( IOException e )
{
getLogger().error( "Error closing input stream must be ignored", e );
}
}
}

0 comments on commit 58cbbe0

Please sign in to comment.