Hi All,

Another issue we discovered with WO 5.4.3:

This code:
NSArray array = new NSArray(new Object[] {"86309", "", "6.4000", "6.4000"});
System.out.println(array.toString());
Outputs the following:

5.3.3 :


( "86309", "", "6.4000", "6.4000" )

5.4.4 :


( 86309,
,
6.4000,
6.4000 )

We relied on NSArray toString() method to generate the plist format for an NSArray. With WO 5.4.3 the output is different and then when we try to parse the string generated by WO 5.4.3 back into an NSArray using NSPropertyListSerialization.propertyListFromString we get this exception:

java.lang.IllegalArgumentException: Property list parsing failed while attempting to read unquoted string. No allowable characters were found. At line number: 1, column: 9. [2009-5-5 16:27:12 EDT] java.lang.IllegalArgumentException: Property list parsing failed while attempting to read unquoted string. No allowable characters were found. At line number: 1, column: 9. at com.webobjects.foundation.NSPropertyListSerialization $ _ApplePList ._readUnquotedStringIntoStringBuffer(NSPropertyListSerialization.java: 1257) at com.webobjects.foundation.NSPropertyListSerialization $ _ApplePList ._readObjectIntoObjectReference(NSPropertyListSerialization.java:1241) at com.webobjects.foundation.NSPropertyListSerialization $ _ApplePList ._readArrayContentsIntoArray(NSPropertyListSerialization.java:1413) at com.webobjects.foundation.NSPropertyListSerialization $ _ApplePList ._readObjectIntoObjectReference(NSPropertyListSerialization.java:1233) at com.webobjects.foundation.NSPropertyListSerialization $ _ApplePList ._readArrayContentsIntoArray(NSPropertyListSerialization.java:1413) at com.webobjects.foundation.NSPropertyListSerialization $ _ApplePList ._readObjectIntoObjectReference(NSPropertyListSerialization.java:1233) at com.webobjects.foundation.NSPropertyListSerialization $_ApplePList.parseStringIntoPlist(NSPropertyListSerialization.java:1069) at com .webobjects .foundation .NSPropertyListSerialization .propertyListFromString(NSPropertyListSerialization.java:1669) at com .webobjects .foundation .NSPropertyListSerialization .propertyListFromString(NSPropertyListSerialization.java:1646)
        at your.app.components.Main.plistTest(Main.java:18)


The workaround is to write our own code for outputting NSArray. But this seems like a WO 5.4.3 bug to me.




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to