Note that in Flex 2 an ActionScript Object is a java.util.Map, and java.util.Map is always an ActionScript Object, not an associative Array (to get legacy behavior there is a channel switch to turn on legacy maps, though this is not suggested for a variety of reasons that I won't go into here).
On serialization java.util.Map keys MUST be able to be represented as a String so I suspect a null key would cause an NPE when the Object traits are written. I'll log a bug for you for beta 3. (Though note that serialization errors like these are hard to turn into properly formatted Flex error messages for a channel because they occur while writing the legitimate response and a response may be for a batch of many requests). Pete -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of jeffrey_lage Sent: Thursday, April 06, 2006 9:19 AM To: [email protected] Subject: [flexcoders] Flex2 B2 Remoting: null handling on java.lang.Map To Whom it May Concern: On the java side of the remoting, it is acceptible to place a 'null' as a key in a HashMap. This object will be remoted to the Flex side as an associative array. As you might know, you can't do something like this in AS3: var o:Object = new Object(); o[null] = "value"; So it makes sense that the remoting layer would have trouble deciding what to do what an array on the java side if it contains a null key. Unfortunately, you get no error message at all from the Flex server. You simply get a malformed AMF message that you player will give an odd error on when it tries to parse. Seems to me this should be bettter handled, but it took a good 3 days to track down, so I thought others might be interested. -Jeff -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

