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

module-info.java file do not use the canonical order for the elements #6938

Closed
kabutz opened this issue Sep 28, 2021 · 1 comment · Fixed by #6937 or #6944
Closed

module-info.java file do not use the canonical order for the elements #6938

kabutz opened this issue Sep 28, 2021 · 1 comment · Fixed by #6937 or #6944
Assignees
Labels
Bug For general bugs on Jetty side

Comments

@kabutz
Copy link
Contributor

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 kabutz added the Bug For general bugs on Jetty side label Sep 28, 2021
@kabutz
Copy link
Contributor Author

kabutz commented Sep 28, 2021

@sbordet

@sbordet sbordet self-assigned this Sep 30, 2021
@sbordet sbordet added this to To do in Jetty 10.0.7/11.0.7 FROZEN via automation Sep 30, 2021
@sbordet sbordet moved this from To do to In progress in Jetty 10.0.7/11.0.7 FROZEN Sep 30, 2021
@sbordet sbordet linked a pull request Sep 30, 2021 that will close this issue
sbordet added a commit that referenced this issue Sep 30, 2021
…r the elements

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

(cherry picked from commit 0269117)
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Jetty 10.0.7/11.0.7 FROZEN automation moved this from In progress to Done Oct 1, 2021
sbordet added a commit that referenced this issue Oct 1, 2021
…r the elements

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

(cherry picked from commit 0269117)
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
No open projects
2 participants