[fix] Remove use of deprecated code
Signed-off-by: Emmanuel Bigeon <emmanuel@bigeon.fr>
This commit is contained in:
@@ -72,20 +72,16 @@ import java.io.InterruptedIOException;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import net.bigeon.gclc.manager.ConsoleInput;
|
||||
import net.bigeon.gclc.tools.ConstantString;
|
||||
|
||||
/** A console input that can be connected to and diconnected from.
|
||||
*
|
||||
* @author Emmanuel Bigeon */
|
||||
public final class ConnectingConsoleInput implements ConsoleInput {
|
||||
|
||||
/** The empty string provider. */
|
||||
private static final ConstantString EMPTY_STRING = new ConstantString("");
|
||||
|
||||
/** If the input is closed. */
|
||||
private boolean close = false;
|
||||
/** The prompt string. */
|
||||
private Supplier<String> prompt = EMPTY_STRING;
|
||||
private Supplier<String> prompt = () -> "";
|
||||
/** If the input is currently in prompting state.
|
||||
* <p>
|
||||
* To change it you should be in a promptLock. */
|
||||
@@ -307,7 +303,7 @@ public final class ConnectingConsoleInput implements ConsoleInput {
|
||||
* @see fr.bigeon.gclc.manager.ConsoleInput#setPrompt(java.lang.String) */
|
||||
@Override
|
||||
public void setPrompt(final String prompt) {
|
||||
this.prompt = new ConstantString(prompt);
|
||||
this.prompt = () -> prompt;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
Reference in New Issue
Block a user