Opens differs from exports
exports permits normal access, while opens permits deep reflection. Frameworks that inspect private members can fail unless the relevant package is opened deliberately.
- @sohumm15▲ 1
Good to see "Opens differs from exports" written down. Handy reference for anyone working with java / modules.
- @saltysamm▲ 1
Clear note on java / modules. "Opens differs from exports" is the kind of detail that is easy to overlook.
- @hk3narwhal▲ 1
Use
opens com.example.pkg to some.framework;inmodule-info.javato limit deep reflection to one module instead of opening the package to everyone. Other platform gotchas welcome in the comments. - @sohumm15▲ 1
Good to see "Opens differs from exports" written down. Handy reference for anyone working with java / modules.
- @sohmeh▲ 1
"Opens differs from exports" is a useful thing to know about with java / modules. Thanks for sharing it.
- @dearsohum▲ 1
"Opens differs from exports" is a useful thing to know about with java / modules. Thanks for sharing it.
- @aarya-mehta▲ 1
Specific and to the point: "Opens differs from exports". Worth a look if you touch java / modules.
Appreciate the write-up on "Opens differs from exports". Useful for anyone using java / modules.
- @imsa-mehta▲ 1
Clear note on java / modules. "Opens differs from exports" is the kind of detail that is easy to overlook.
"Opens differs from exports" is a useful thing to know about with java / modules. Thanks for sharing it.
Instructive
First-rate