Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed order of entries in module-info.java to be canonical #6937

Merged

Conversation

kabutz
Copy link
Contributor

@kabutz kabutz commented Sep 28, 2021

It seems that the canonical order of the elements inside the module-info.java file in the OpenJDK/src is always the same:

`module some.module.name {
requires ...

requires transitive ...

exports ...

exports ... to
...

opens ... to
...

uses ...

provides ... with
...
}`

The order in our module-info.java files were a bit muddled, with requires sometimes appearing near the end.

Furthermore, the entries are usually alphabetically sorted.

(There is one case in the OpenJDK where requires transitive is out of order, but that was because someone changed it and didn't reorder it. I've sent a pull-request there too, but it's so insignificant I almost doubt it will be accepted.)

See also
https://docs.oracle.com/javase/specs/jls/se17/html/jls-7.html#jls-ModuleDirective

@kabutz
Copy link
Contributor Author

kabutz commented Sep 28, 2021

@sbordet this touched a lot of files and there is a distinct possibility that I made a mistake somewhere, despite checking everything several times.

@sbordet sbordet self-requested a review September 30, 2021 06:17
@sbordet sbordet linked an issue Sep 30, 2021 that may be closed by this pull request
@sbordet sbordet added this to In progress in Jetty 10.0.7/11.0.7 FROZEN via automation Sep 30, 2021
Jetty 10.0.7/11.0.7 FROZEN automation moved this from In progress to Reviewer approved Sep 30, 2021
@sbordet sbordet merged commit 0269117 into jetty:jetty-11.0.x Sep 30, 2021
Jetty 10.0.7/11.0.7 FROZEN automation moved this from Reviewer approved to Done Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

module-info.java file do not use the canonical order for the elements
2 participants