• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSArray toString() different in WO 5.4.3
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSArray toString() different in WO 5.4.3


  • Subject: NSArray toString() different in WO 5.4.3
  • From: "Ricardo J. Parada" <email@hidden>
  • Date: Tue, 05 May 2009 17:59:25 -0400

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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSArray toString() different in WO 5.4.3
      • From: Mike Schrag <email@hidden>
    • Re: NSArray toString() different in WO 5.4.3
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: No snapshot for gid _EOIntegralKeyGlobalID
  • Next by Date: Re: NSArray toString() different in WO 5.4.3
  • Previous by thread: Re: No snapshot for gid _EOIntegralKeyGlobalID
  • Next by thread: Re: NSArray toString() different in WO 5.4.3
  • Index(es):
    • Date
    • Thread