src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/ExecPty.java
changeset 58903 eeb1c0da2126
parent 55357 6c8d5d0e1be4
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/ExecPty.java	Mon Nov 04 14:26:18 2019 +0800
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/ExecPty.java	Mon Nov 04 09:40:35 2019 +0100
@@ -1,10 +1,10 @@
 /*
- * Copyright (c) 2002-2019, the original author or authors.
+ * Copyright (c) 2002-2016, the original author or authors.
  *
  * This software is distributable under the BSD license. See the terms of the
  * BSD license in the documentation provided with this software.
  *
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
  */
 package jdk.internal.org.jline.terminal.impl;
 
@@ -137,15 +137,12 @@
         }
         String undef = System.getProperty("os.name").toLowerCase().startsWith("hp") ? "^-" : "undef";
         for (ControlChar cchar : ControlChar.values()) {
-            if (attr.getControlChar(cchar) != current.getControlChar(cchar)) {
+            int v = attr.getControlChar(cchar);
+            if (v >= 0 && v != current.getControlChar(cchar)) {
                 String str = "";
-                int v = attr.getControlChar(cchar);
-                if (v == -1) { // Skip if ControlChar is <UNDEF>
-                    continue;
-                }
                 commands.add(cchar.name().toLowerCase().substring(1));
                 if (cchar == ControlChar.VMIN || cchar == ControlChar.VTIME) {
-                    commands.add(Integer.toBinaryString(v));
+                    commands.add(Integer.toString(v));
                 }
                 else if (v == 0) {
                     commands.add(undef);