On Wednesday, May 9, 2012 4:47:47 PM UTC+2, Thomas Broyer wrote: > > Yes, please file a bug for that. > > If you can contribute the patch to gwt-code-reviews.appspot.com it'd be > even better (see > https://developers.google.com/web-toolkit/makinggwtbetter#contributingcode > ) > As far as the patch goes, your processing loses the "most-to-least-derived > type" ordering of the domainToClientType values that > Deobfuscator#getClientProxies mandates. > See > http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/web/bindery/requestfactory/apt/TypeComparator.java > for > the ordering, to be ported to Class<?> (see > http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/place/rebind/MostToLeastDerivedPlaceTypeComparator.javafor > an almost-equivalent) >
Thinking about it now, it looks like some simple Set processing could work, without the need to resolve Class<?>s and compare them, because the lists in both deobfuscators are already "complete" wrt inheritance hierarchy: using A and B ordered sets as input, the resulting list C = (A-B) + (B-A) + intersection(A,B), or more simply: C = (A-B) + B. The idea is that everything that's not already in the list wouldn't change the result; this assumes however that the deobfuscators have been created from the same interface hierarchies (e.g. if in one case the list were C,B,A, where C extends B, and B extends A; and in the other case the list were C,A, with C extends A, then constructing a "merged list" B,C,A would be wrong; that's really an edge-case and I wouldn't bother if that failed). Something like: LinkedHashSet<String> a_only = new LinkedHashSet<String>(d.domainToClientType.get(domain)); a_only.removeAll(existing.domainToClientType.get(domain)); ArrayList<String> new_list = new ArrayList<String>(a_only); new_list.addAll(existing.domainToClientType.get(domain)); -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/-5wv6ELRH7kJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.