Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6568430

native2ascii should print error messages to stderr

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 6
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      Description

      A DESCRIPTION OF THE REQUEST :
      The native2ascii tool seems to print error messages to the standard output stream and not the standard error stream.



      JUSTIFICATION :
      If native2ascii's standard output stream has been redirected to a file or another process and an error occurs the user won't know it; this is a usability issue. The user won't know that something has gone wrong until he/she tries to do something with the output file.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The desired behaviour is that error messages are printed to the standard error stream. This way error messages are not hidden from the user.
      ACTUAL -
      For example, if the file Test.txt doesn't exist, the command

      $ native2ascii Test.txt > Test.properties

      writes the error message "java.lang.Exception: Test.txt could not be read" to the file Test.properties and the user won't know that an error has occured. The same thing happens if an unsupported encoding has been used.

      CUSTOMER SUBMITTED WORKAROUND :
      Don't use shell redirection with native2ascii.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sherman Xueming Shen
              Reporter:
              ryeung Roger Yeung (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: