Hi all,

On 14.10.2025 21:02, [email protected] wrote:
> The following commit(s) were added to refs/heads/master by this push:
>      new f51d19cab Sort members
> f51d19cab is described below
> 
> commit f51d19cabad7b8c67e2992a2ab22465658249485
> Author: Gary Gregory <[email protected]>
> AuthorDate: Tue Oct 14 15:02:23 2025 -0400
> 
>     Sort members

Sorting class members can be quite a disruptive change, as it breaks
most history and diff comparison algorithms. Could we please avoid such
commits directly on the `master` branch?

I’m fully in favor of following clear conventions, but I’d prefer if we
discuss and document them before. The default alphabetical sorting used
by Eclipse is only one of several possible approaches, and not always
the most meaningful one. For instance, I often prefer ordering private
helper methods according to the call graph for better readability.

In this particular commit [1], the sorting order (static methods
alphabetically followed by instance methods alphabetically) feels
counterproductive, especially for unit test classes.

For example, when working with parameterized tests, I typically use a
pattern like:

    static Stream<Arguments> testFoo() {
        ...
    }

    @ParameterizedTest
    @MethodSource
    void testFoo(...) {
        ...
    }

This grouping keeps related data providers and test methods together and
visible on one screen. Moving all static methods before instance methods
breaks that logical pairing and reduces readability.

Piotr

References:
[1]
https://github.com/apache/commons-io/commit/f51d19cabad7b8c67e2992a2ab22465658249485




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to