core/src/main/java/flex/messaging/io/amf/Amf0Output.java [311:359]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            ArrayCollection ac;

            if (col instanceof ArrayCollection) {
                ac = (ArrayCollection) col;
                // TODO: QUESTION: Pete ignoring the descriptor here... not sure if
                // we should modify the user's AC as that could cause corruption?
            } else {
                // Wrap any Collection in an ArrayCollection
                ac = new ArrayCollection(col);
                if (desc != null)
                    ac.setDescriptor(desc);
            }

            // Then wrap ArrayCollection in PropertyProxy for bean-like serialization
            PropertyProxy proxy = PropertyProxyRegistry.getProxy(ac);
            writePropertyProxy(proxy, ac);
        }
    }

    /**
     *
     */
    protected void writeCustomObject(Object o) throws IOException {
        PropertyProxy proxy = null;

        if (o instanceof PropertyProxy) {
            proxy = (PropertyProxy) o;
            o = proxy.getDefaultInstance();

            // The proxy may wrap a null default instance, if so, short circuit here.
            if (o == null) {
                writeAMFNull();
                return;
            }
            // HACK: Short circuit and unwrap if PropertyProxy is wrapping an Array
            // or Collection type since we don't yet have the ability to proxy multiple
            // AMF types. We write an AMF Array directly instead of an AMF Object
            else if (o instanceof Collection) {
                if (context.legacyCollection)
                    writeCollection((Collection) o, proxy.getDescriptor());
                else
                    writeArrayCollection((Collection) o, proxy.getDescriptor());
                return;
            } else if (o.getClass().isArray()) {
                writeObjectArray((Object[]) o, proxy.getDescriptor());
                return;
            } else if (context.legacyMap && o instanceof Map && !(o instanceof ASObject)) {
                writeMapAsECMAArray((Map) o);
                return;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



core/src/main/java/flex/messaging/io/amfx/AmfxOutput.java [485:533]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            ArrayCollection ac;

            if (col instanceof ArrayCollection) {
                ac = (ArrayCollection) col;
                // TODO: QUESTION: Pete, ignoring the descriptor here... not sure if
                // we should modify the user's AC as that could cause corruption?
            } else {
                // Wrap any Collection in an ArrayCollection
                ac = new ArrayCollection(col);
                if (desc != null)
                    ac.setDescriptor(desc);
            }

            // Then wrap ArrayCollection in PropertyProxy for bean-like serialization
            PropertyProxy proxy = PropertyProxyRegistry.getProxy(ac);
            writePropertyProxy(proxy, ac);
        }
    }

    /**
     *
     */
    protected void writeCustomObject(Object o) throws IOException {
        PropertyProxy proxy = null;

        if (o instanceof PropertyProxy) {
            proxy = (PropertyProxy) o;
            o = proxy.getDefaultInstance();

            // The proxy may wrap a null default instance, if so, short circuit here.
            if (o == null) {
                writeAMFNull();
                return;
            }
            // HACK: Short circuit and unwrap if PropertyProxy is wrapping an Array
            // or Collection type since we don't yet have the ability to proxy multiple
            // AMF types. We write an AMF Array directly instead of an AMF Object
            else if (o instanceof Collection) {
                if (context.legacyCollection)
                    writeCollection((Collection) o, proxy.getDescriptor());
                else
                    writeArrayCollection((Collection) o, proxy.getDescriptor());
                return;
            } else if (o.getClass().isArray()) {
                writeObjectArray((Object[]) o, proxy.getDescriptor());
                return;
            } else if (context.legacyMap && o instanceof Map && !(o instanceof ASObject)) {
                writeMapAsECMAArray((Map) o);
                return;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



