#424 Finer-grained control over positioning of static imports

Future
open
nobody
5
2012-10-10
2006-07-09
Paul Holser
No

Would like for the imports rules to support different
strategies for positioning of static imports. Right
now it looks as though static imports sort as though
the package name begins with "static", so that:

import test.foo.Bar;
import static test.foo.Bar.baz;

would flag as out-of-order, even though the imports
really refer to the same package.

I'd like to see the following strategies allowed:

-- simply disregard "static" in the sorting, so that
you can do the above

-- require that all static imports in a group follow
the regular imports, e.g.:

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Collections.singletonList;

-- require that all static imports be a group unto
themselves.

-- others?

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks