Hello,
The rule reacts as expected regarding its description, which means that it will raise an issue if members are not ordered as follow:
- Class (static) and instance variables
- Constructors
- Methods (including static)
In your case, you will then naturally get an issue as your (static) method is placed before the constructor.
Note that according to the
Code Conventions for the Java TM Programming Language (
revision date is April 20, 1999: http://www.oracle.com/technetwork/java/codeconventions-141855.html#1852), if static fields should come first (before instance fields - even if we currently do not do any difference in the implementation), static methods will definitely stay with the other methods, after the constructors.
Regarding eclipse IDE sorting function, it is apparently applying another convention, which is not the one we follow. It doesn't mean neither that there is a bug in our implementation.
If sorting your members using eclipse causes unexpected issues on your side, note that you can also modify the sorting order to stay conform with the rule.
Regards,