Community
Participate
Working Groups
Build 3.2M2 Likely due to bug 113765, when sorting members for following code with syntax errors, it ends up corrupting the entire source. //BEFORE import java.util.*; public interface X<T> { <K> List<Map<K,T> foo(Map<T,K> m); <K,E> List<Map<K,E> bar(Map<T,K> m, Map<T,E> e); } //AFTER import java.util.*; public interface X<T> { <K> List<Map<K,E> bar(Map<T,K> m, Map<T,E> e); <K,E> List<Map<K,T> foo(Map<T,K> m); } Due to bug 113765, some portions of a method signature are left in original code (i.e. not considered as attached to anything), and thus got ignored when sorting. But in general, in presence of diet parse errors, any attempt of sorting elements is likely doomed in a similar fashion. If so, then I would vote for having the sorting operation do nothing in such cases.
The only way I see to fix this is to check if any body declaration is malformed. If this is the case, then we should abort the sorting.
*** This bug has been marked as a duplicate of 113722 ***