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

Could com.egzosn:pay-java-web-support:2.14.4-fix drop off redundant dependencies? #92

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Celebrate-future
Copy link

@Celebrate-future Celebrate-future commented May 24, 2022

image

Hi! I found the pom file of project com.egzosn:pay-java-web-support:2.14.4-fix introduced 11 dependencies. However, among them, 5 libraries (45%) are not used by your project. I list the redundant dependencies below (labelled as red ones in the figure):

Redundant dependencies

commons-logging:commons-logging:jar:1.2:compile
org.apache.httpcomponents:httpmime:jar:4.5.4:compile
org.apache.httpcomponents:httpclient:jar:4.5.4:compile
commons-codec:commons-codec:jar:1.10:compile
org.apache.httpcomponents:httpcore:jar:4.4.7:compile

Outdated dependencies

commons-codec:commons-codec:1.10 (3188 days without maintenance)
org.apache.httpcomponents:httpcore:4.4.7 (2149 days without maintenance)


Removing the redundant dependencies can reduce the size of project and prevent potential dependency conflict issues (i.e., multiple versions of the same library). More importantly, one of the redundant dependencies org.apache.httpcomponents:httpclient:jar:4.5.4:compile incorporates a medium-level vulnerability SNYK-JAVA-ORGAPACHEHTTPCOMPONENTS-1048058. As such, I suggest a refactoring operation for com.egzosn:pay-java-web-support:2.14.4-fix’s pom file.

The attached PR helps resolve the reported problem. It is safe to remove the unused libraries (we considered Java reflection relations when analyzing the dependencies). These changes have passed com.egzosn:pay-java-web-support:2.14.4-fix’s maven tests.

Best regards

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

Successfully merging this pull request may close these issues.

1 participant