Description
This is the same as CONFIGURATION-427 except that it applies to setProperty which was missed in the original fix.
final FileBasedConfigurationBuilder<FileBasedConfiguration> builder = new FileBasedConfigurationBuilder<>(XMLPropertyListConfiguration.class); final FileBasedConfiguration configuration = builder.getConfiguration(); configuration.setProperty("things", ['chair', 'hat', 'door']); final FileHandler fileHandler = new FileHandler(configuration); fileHandler.save(System.out);
results in
<?xml version="1.0"?> <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd"> <plist version="1.0"> <dict> <key>things</key> <string>chair</string> <key>things</key> <string>hat</string> <key>things</key> <string>door</string> </dict> </plist>
expecting
<?xml version="1.0"?> <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd"> <plist version="1.0"> <dict> <key>things</key> <array> <string>chair</string> <string>hat</string> <string>door</string> </array> </dict> </plist>
Attachments
Issue Links
- is a clone of
-
CONFIGURATION-427 XMLPropertyListConfiguration cannot save arrays in the correct plist form
- Closed