Open
Description
A number of production classes and test classes alike import all the members of a class using a star import or static star import.
Star imports do not improve the readability of a class, and often times introduces ambiguity (confusion) when more than one class shares a similar API (e.g. by name).
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
mp911de commentedon Apr 19, 2022
As per our conventions, we use star imports if we use more than 10 members from a package.
jxblum commentedon Apr 19, 2022
I think that convention should be changed. Star imports serves no useful purpose.
karthikeyan-r commentedon May 1, 2022
Hi @mp911de , I would like to contribute to this fix. I found that star imports are done in CreatedBy.Java & CreatedDate.java for static import of ENUM types (3 fields).
Shall i change this or is it based on convention ?
mp911de commentedon May 1, 2022
Thanks for reaching out. Changing code style is a team issue on which we've not decided yet. It doesn't make sense to proceed here yet.
Going forward, we have about 16 repositories with 4 maintained branches each that we take care of. If we would proceed, then a pull request isn't efficient.