You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.)
…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>
…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>
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
The text was updated successfully, but these errors were encountered: