On Wednesday, May 9, 2012 4:47:47 PM UTC+2, Thomas Broyer wrote:
Yes, please file a bug for that.
As far as the patch goes, your processing loses the "most-to-least-derived type" ordering of the domainToClientType values that Deobfuscator#getClientProxies mandates.
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));