Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.4, 2.2.0
    • Fix Version/s: 2.2.2, 3.0.0
    • Component/s: karaf-shell
    • Labels:
      None
    • Environment:

      Windows

      Description

      When running Karaf on Windows with -Djline.terminal=jline.UnsupportedTerminal the Karaf prompt in the console is displayed twice after executing some command (i.e. pressing enter).

      I believe the problem is in the jline library in ConsoleReader.readLine(InputStream) as the function will return after seeing first \r or \n. But on Windows \r\n is used as the EOL and the function does not consume the remaining \n.

        Activity

        Hide
        pieber Andreas Pieber added a comment -

        I can reproduce this error also in the linux shell if I use -Djline.terminal=jline.UnsupportedTerminal. Let's see if I can get it running with a patched jline version

        Show
        pieber Andreas Pieber added a comment - I can reproduce this error also in the linux shell if I use -Djline.terminal=jline.UnsupportedTerminal. Let's see if I can get it running with a patched jline version
        Hide
        pieber Andreas Pieber added a comment -

        correction. I mean a different issue in linux . This one is windows only (I can reproduce it)

        Show
        pieber Andreas Pieber added a comment - correction. I mean a different issue in linux . This one is windows only (I can reproduce it)
        Hide
        gawor@mcs.anl.gov Jarek Gawor added a comment -

        I committed fixes for this problem to trunk (revision 1124286) and 2.2 branch (revision 1124287). I updated the jline.console.ConsoleReader to consume the extra LF character if there is one - much like what BufferedReader does.

        Show
        gawor@mcs.anl.gov Jarek Gawor added a comment - I committed fixes for this problem to trunk (revision 1124286) and 2.2 branch (revision 1124287). I updated the jline.console.ConsoleReader to consume the extra LF character if there is one - much like what BufferedReader does.
        Hide
        jgoodyear Jamie goodyear added a comment -

        Fixed in Apache Karaf 2.2.2.

        Show
        jgoodyear Jamie goodyear added a comment - Fixed in Apache Karaf 2.2.2.

          People

          • Assignee:
            gawor@mcs.anl.gov Jarek Gawor
            Reporter:
            gawor@mcs.anl.gov Jarek Gawor
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development