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

PropertiesConfiguration does not use the default encoding to load files

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5
    • 1.6
    • None
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: