diff --git a/terminal/src/main/java/org/jline/terminal/Attributes.java b/terminal/src/main/java/org/jline/terminal/Attributes.java index 733a77f6b..08341db6a 100644 --- a/terminal/src/main/java/org/jline/terminal/Attributes.java +++ b/terminal/src/main/java/org/jline/terminal/Attributes.java @@ -288,7 +288,8 @@ public void setControlChars(EnumMap chars) { } public int getControlChar(ControlChar c) { - return cchars.getOrDefault(c, -1); + Integer v = cchars.get(c); + return v != null ? v : -1; } public void setControlChar(ControlChar c, int value) {