[fix] Remove use of deprecated code
Signed-off-by: Emmanuel Bigeon <emmanuel@bigeon.fr>
This commit is contained in:
@@ -51,7 +51,6 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import net.bigeon.gclc.manager.ConsoleInput;
|
||||
import net.bigeon.gclc.tools.ConstantString;
|
||||
import net.bigeon.gclc.utils.ReadingRunnable;
|
||||
|
||||
/** A console input where the stream can be plugged.
|
||||
@@ -78,7 +77,7 @@ public final class PluggableConsoleInput implements ConsoleInput {
|
||||
/** If the element is closed. */
|
||||
private boolean closed = false;
|
||||
/** The default prompt. */
|
||||
private Supplier<String> prompt = new ConstantString("> "); //$NON-NLS-1$
|
||||
private Supplier<String> prompt = () -> "> "; //$NON-NLS-1$
|
||||
/** If the input is plugged or buffering. */
|
||||
private boolean connected = false;
|
||||
/** The current connexion (if any). */
|
||||
@@ -263,7 +262,7 @@ public final class PluggableConsoleInput implements ConsoleInput {
|
||||
* @see net.bigeon.gclc.manager.ConsoleInput#setPrompt(java.lang.String) */
|
||||
@Override
|
||||
public void setPrompt(final String prompt) {
|
||||
setPrompt(new ConstantString(prompt));
|
||||
setPrompt(() -> prompt);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
Reference in New Issue
Block a user