8321409: Console read line with zero out should zero out underlying buffer in JLine (redux)
Reviewed-by: alanb
This commit is contained in:
parent
fe4c0a2f04
commit
4ed38f5ad5
src/jdk.internal.le/share/classes/jdk/internal/org/jline
@ -114,7 +114,7 @@ public class JdkConsoleProviderImpl implements JdkConsoleProvider {
|
||||
} catch (EndOfFileException eofe) {
|
||||
return null;
|
||||
} finally {
|
||||
jline.getBuffer().zeroOut();
|
||||
jline.zeroOut();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -750,4 +750,9 @@ public interface LineReader {
|
||||
void setAutosuggestion(SuggestionType type);
|
||||
|
||||
SuggestionType getAutosuggestion();
|
||||
|
||||
// JDK specific modification
|
||||
default void zeroOut() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
|
@ -6250,4 +6250,10 @@ public class LineReaderImpl implements LineReader, Flushable
|
||||
}
|
||||
}
|
||||
|
||||
// JDK specific modification
|
||||
@Override
|
||||
public void zeroOut() {
|
||||
buf.zeroOut();
|
||||
parsedLine = null;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user