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

Excess Dependencies Defined in Module Declarations #3

Open
negarq opened this issue Apr 23, 2018 · 0 comments
Open

Excess Dependencies Defined in Module Declarations #3

negarq opened this issue Apr 23, 2018 · 0 comments

Comments

@negarq
Copy link

negarq commented Apr 23, 2018

I realized some excess dependencies defined in the module declaration for some of the modules in this project. These dependencies are defined in module-info.java files via different types of module directives, such as requires, exports, etc., that are not actually used in the source code of applications.

According to the specification of project Jigsaw, these types of dependencies may lead to various software issues. For example, such dependencies may lead to security vulnerabilities due to overexposure of module internals. As another example, excess dependencies may undermine proper encapsulation, reducing software maintainability.

I found the following excess dependencies defined in the module declarations:

1- module "com.mechanitis.demo.sense.client" requires module "javafx.controls", while none of the classes in module "com.mechanitis.demo.sense.client" uses any packages of the required module "javafx.controls".
2- module "com.mechanitis.demo.sense.client" requires module "javafx.base", while none of the classes in module "com.mechanitis.demo.sense.client" uses any packages of the required module "javafx.base".
3- module "com.mechanitis.demo.sense.client" requires module "java.logging", while none of the classes in module "com.mechanitis.demo.sense.client" uses any packages of the required module "java.logging".
4- module "com.mechanitis.demo.sense.flow" requires module "java.logging", while none of the classes in module "com.mechanitis.demo.sense.flow" uses any packages of the required module "java.logging"
5- module "com.mechanitis.demo.sense.mood" requires module "com.mechanitis.demo.sense.flow", while none of the classes in module "com.mechanitis.demo.sense.mood" uses any packages of the required module "com.mechanitis.demo.sense.flow"
6- module "com.mechanitis.demo.sense.mood" requires module "java.logging", while none of the classes in module "com.mechanitis.demo.sense.mood" uses any packages of the required module "java.logging"
7- module "com.mechanitis.demo.sense.service" requires module "java.logging", while none of the classes in module "com.mechanitis.demo.sense.service" uses any packages of the required module "java.logging"
8- module "com.mechanitis.demo.sense.twitter" requires module "java.logging", while none of the classes in module "com.mechanitis.demo.sense.twitter" uses any packages of the required module "java.logging"
9- module "com.mechanitis.demo.sense.user" requires module "com.mechanitis.demo.sense.flow", while none of the classes in module "com.mechanitis.demo.sense.user" uses any packages of the required module "com.mechanitis.demo.sense.flow"
10- module "com.mechanitis.demo.sense.flow" exports package "com.mechanitis.demo.sense.flow", while no other package within the application uses it.
11- module "om.mechanitis.demo.sense.client" exports package "com.mechanitis.demo.sense.client" to module "javafx.graphics", while none of the classes in module "javafx.graphics" uses the exported package "com.mechanitis.demo.sense.client".

Do you believe removal or reduction of these excess dependencies would improve maintainability or security of your project?

I would highly appreciate it if you could help me understand the reason behind specification of such excess dependencies in your project.

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

No branches or pull requests

1 participant