Oliver Heger a écrit :
I haven't used XMLPropertyListConfiguration myself. But from a short
glance at the code I fear that there could be a bug related to the
handling of arrays. What exactly is the result when you call
setProperty() with the modified byte[]?
I reproduced this issue, a byte[] is transformed into a list of integers
by HierarchicalConfiguration.setProperty(). This code :
FileConfiguration config = new XMLPropertyListConfiguration();
config.setProperty("foo", new byte[] { 1, 2, 3, 4 });
config.save("config.plist");
generates this :
<plist version="1.0">
<dict>
<key>foo</key>
<integer>1</integer>
<key>foo</key>
<integer>2</integer>
<key>foo</key>
<integer>3</integer>
<key>foo</key>
<integer>4</integer>
</dict>
</plist>
instead of
<plist version="1.0">
<dict>
<key>foo</key>
<data>01020304</data>
</dict>
</plist>
I don't know how to fix this easily. Maybe by adding a flag in
HierarchicalConfiguration to prevent the arrays from being split into a
list of nodes ?
Emmanuel Bourg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]