Community
Participate
Working Groups
Sort-members-but-ignore-fields fails to prevent sorting by member access, which results in field reordering that causes compiler error. (1) In Preferences, (a) In Java, editor, save action, enable "Code Organizing" tab, "Members" section, "Sort members" checkbox and "Ignore fields and enum constants" radio button (b) In Java, appearance, Members Sort Order, enable checkbox "Sort members in same category by visibility" (2) Create the following class: package main; public class Main { static final Object b = "a"; public static final Object a = b; } (3) Edit (add spaces) and save RESULT: a re-ordered before b, causing compile-time error True in 3.4M5 and 3.3.1.1. Workaround: disable (1)(a) or (b). This means we can't use save actions to enforce code formatting for our team. We do want methods sorted.
Suggesting M6 schedule :)
Ugly but probably not easy to detect without flow analysis or temporary compilation in the background. Wes, please don't set priority and target milestone. Those fields are reserved for the developers.
>Ugly but probably not easy to detect without flow analysis or temporary >compilation in the background. Actually, this is not needed as "Ignore fields and enum constants" is selected. Hence we probably just forgot to apply this when doing the visibility dance.
Yes, the fields must not be sorted if 'do not sort fields' is enabled, no matter what. Sort Members action has the same problem, probably like this since day one.
Created attachment 89483 [details] fix Got introduced by bug 65304
fixed > I20080206-1800
Sorry about trying to set a schedule. Thanks much for the quick reply and fix. That encourages me to write up more of the bugs I find.
verified in I20080325-0100