On 11-Feb-09, at 1:58 PM, John Tamplin wrote:

> Well, we have tests that verify it and I think I have seen it once  
> in the wild, but I agree it is pretty worthless and trying to  
> support it complicates our life significantly.
>
> For the TypeOracle case, the main thing I worry about is  
> serializability issues from types reachable in inner classes.  If  
> TypeOracle no longer saw anonymous classes, how would that work?

Can anonymous inner classes participate in serialization at all right  
now?  I just ran a quick test with an anonymous class that implemented  
an RPC method's parameter's type and it wasn't picked up for  
serialization.  Additionally, one of its fields that matches the  
criteria for serialization wasn't picked up either.

      [java]  
com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException:  
Type 'test.client.module$2$1' was not included in the set of types  
which can be deserialized by this SerializationPolicy or its Class  
object could not be loaded. For security purposes, this type will not  
be deserialized.



public class Base implements IsSerializable, Serializable {
}



@RemoteServiceRelativePath("echo")
public interface EchoService extends RemoteService {
        String echo(Base input);
}



echoService.echo(new Base() {
        protected String field = textToServer;

        public String getField() {
                return field;
        }

        public void setField(String field) {
                this.field = field;
        }

        @Override
        public String toString() {
                return field;
        }
}, new AsyncCallback<String>() {
        public void onFailure(Throwable caught) {
                Window.alert("Rpc failure");
        }

        public void onSuccess(String result) {
                dialogBox.setText(dialogBoxText + "\n " + result);
        }
});


--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to