Issue Details (XML | Word | Printable)

Key: CONFIGURATION-345
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Oliver Heger
Reporter: Guillaume Darmont
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons Configuration

PropertiesConfiguration does not use the default encoding to load files

Created: 03/Nov/08 10:45 AM   Updated: 22/Aug/09 07:36 PM
Return to search
Component/s: None
Affects Version/s: 1.5
Fix Version/s: 1.6

Time Tracking:
Not Specified

Environment: Win XP / Sun JVM 1.5.0_14

Resolution Date: 08/Nov/08 09:17 PM


 Description  « Hide
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.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Oliver Heger made changes - 08/Nov/08 08:54 PM
Field Original Value New Value
Assignee Oliver Heger [ oliver.heger@t-online.de ]
Oliver Heger made changes - 08/Nov/08 09:17 PM
Resolution Fixed [ 1 ]
Fix Version/s 1.6 [ 12312450 ]
Status Open [ 1 ] Resolved [ 5 ]
Oliver Heger made changes - 22/Aug/09 07:36 PM
Status Resolved [ 5 ] Closed [ 6 ]