Uploaded image for project: 'Commons Configuration'
  1. Commons Configuration
  2. CONFIGURATION-345

PropertiesConfiguration does not use the default encoding to load files

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.6
    • Component/s: None
    • Labels:
      None
    • Environment:

      Win XP / Sun JVM 1.5.0_14

      Description

      The piece of code

      PropertiesConfiguration.java
          // initialization block to set the encoding before loading the file in the constructors
          {
              setEncoding(DEFAULT_ENCODING);
          }
      

      seems to set correctly the default encoding, but this block is called after "super()" in constructors.

      So when using either PropertiesConfiguration(java.io.File file), PropertiesConfiguration(java.lang.String fileName) or PropertiesConfiguration(java.net.URL url), the super() statement is called, and it loads the file without the default encoding.

        Attachments

          Activity

            People

            • Assignee:
              oheger Oliver Heger
              Reporter:
              gdarmont Guillaume Darmont
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: