Hi All,

I have an application with 2 gwt modules. Each module uses its own
RequestFactory and its own Proxy for the same domain object (ie. 2
RequestFactory with 2 differents Proxy on the same domain class).
The first RF call succeeds and following RF of the same type too but when
the other RF is used an exception occurs :
"The domain type Xxx cannot be sent to the client"

After some tests, the problem occurs only for 2 RF. Having only one RF with
2 Proxy on the same domain object works well.

The problem seems to be in
com.google.web.bindery.requestfactory.vm.impl.Deobfuscator.Builder.merge(Deobfuscator).
Doing the following modification resolves it.

    public Builder merge(Deobfuscator existing) {
+      Set<String> domains = new HashSet<String>();
+      domains.addAll(d.domainToClientType.keySet());
+      domains.addAll(existing.domainToClientType.keySet());
+      for (String domain : domains) {
+        Set<String> clientTypes = new HashSet<String>();
+        clientTypes.addAll(d.domainToClientType.get(domain));
+        clientTypes.addAll(existing.domainToClientType.get(domain));
+        d.domainToClientType.put(domain, Collections.unmodifiableList(new
ArrayList<String>(clientTypes)));
+      }
-      d.domainToClientType.putAll(existing.domainToClientType);
      d.operationData.putAll(existing.operationData);
      // referencedTypes recomputed in build()
      d.typeTokens.putAll(existing.typeTokens);
      return this;
    }

Can someone confirms this is a bug ? (I haven't found any issue on that)

Alexandre

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to