Skip to content

Conversation

@dbmalkovsky
Copy link
Contributor

It appears from reading the checkstyle files that avoiding wildcard imports is the preference for the project.

BTW, is there a preferred ordering of imports? Alphabetic order? Static imports first? Crosswire classes first? Something else?

@dmsmith
Copy link
Contributor

dmsmith commented Jun 3, 2025

For ordering, CrossWire first. Then library imports, such as Lucene. Then Java. Alphabetic within each. Basic idea is most important to least important.

Statics are new to JSword. We had been maintaining JSword for Java 5. We are now on Java 7 with some Java 8 features implemented in Android's earlier implementation of Java. Statics obscure the class from where they are from. No opinion where they should be. Any thoughts? I'd hope that organizing imports would be easy. I know Eclipse allows a file describing the ordering of imports.

@dmsmith dmsmith merged commit a77dd44 into crosswire:master Jun 3, 2025
1 check passed
@dbmalkovsky
Copy link
Contributor Author

dbmalkovsky commented Jun 3, 2025

In all the other projects I work on the static import statements come first.

So the list would be something like:

import static *
<blank line>
import org.crosswire.*
<blank line>
import com.*
<blank line>
import liquibase.*
<blank line>
import org.*
<blank line>
import jakarta.*
<blank line>
import java.*
<blank line>
import javax.*

If this is acceptable I will start updating files in small groups so it is easier to review and approve.

@dmsmith
Copy link
Contributor

dmsmith commented Jun 3, 2025

I'm fine with that but....
The problem with that is that we are wanting to merge the changes from the STEP Bible JSword fork. This will likely cause conflicts. It'd be easier to do afterwards.

If you'd like to help with that, that'd be great. I started stepbible-integrate branch for that. It is not current with master which was just updated from andbible-integrate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants