Uploaded image for project: 'Forge: Jansi'
  1. Forge: Jansi
  2. JANSI-4

Restore command console after closing wrapped OutputStream on Windows

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: Major
    • Resolution: Done
    • Labels:
      None
    • Environment:

      Jansi 1.0, Windows

      Description

      When a Java console app using Jansi quits, it can leave the colors set to different colors than when the application was started. This can become very ugly and annoying if for example reverse coloring has been enabled. I've created a small patch that will restore the original colors when the wrapped OutputStream is closed: by using a regular close() method, clients don't have to introduce a custom Jansi dependency in their code just to be able to restore the command console, they just have to close their stream.
      Existing client that do not close their OutputStream are simply not affected.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                chirino Hiram Chirino
                Reporter:
                jkuipers Joris Kuipers
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: