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

m-let service depends on the default encoding

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      beta2
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      Name: poR10007 Date: 04/07/2004



      The getMBeansFromURL() methods of the class javax.management.loading.MLet
      use the system default encoding when reading an m-let text file. This may
      cause a compatibility problem between systems with different default
      charsets.

      The InputStreamReader which is used to read m-let files in the MLetParser class
      is created using a default charset. According to java.nio.charset.Charset spec:

        "Every instance of the Java virtual machine has a default charset,
         which may or may not be one of the standard charsets. The default
         charset is determined during virtual-machine startup and typically
         depends upon the locale and charset being used by the underlying
         operating system."

      Thus, if one system uses, for example, Cp037 as the default charset, and
      it tries to load an m-let file from another system which uses ASCII default
      charset, then such operation will fail.

      The m-let service should use the charset defined in the spec. See also
      the corresponding spec bug 5028083 "JMX spec should specify character
      encoding for m-let text file".

      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lmalvent Luis-Miguel Alventosa (Inactive)
              Reporter:
              passunw Pas Pas (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: