Skip to content

Comments

Reduce implementation dependencies#81

Merged
cdisselkoen merged 1 commit intocedar-policy:mainfrom
exceptionfactory:reduce-dependencies-1
Feb 9, 2024
Merged

Reduce implementation dependencies#81
cdisselkoen merged 1 commit intocedar-policy:mainfrom
exceptionfactory:reduce-dependencies-1

Conversation

@exceptionfactory
Copy link
Contributor

Issue #, if available:

Description of changes:

This pull request reduces the number and scope of dependencies required for the cedar-java library.

Changes include the following:

  • Removed unused Apache Commons Text
  • Removed Google Guava
  • Replaced Guava ImmutableList with Collection.unmodifiableList()
  • Changed FindBugs annotations library to compileOnly
  • Changed Log4j 2 to testImplementation

Apache Commons Text did not have any direct references in Java classes. Log4j 2 is only necessary for test classes, so it should be declared as a test implementation dependency, allowing runtime integrations to provide an SLF4J implementation as needed.

FindBugs provides annotations to suppress FindBugs warnings, but these annotations are not necessary for runtime operation, as Java Virtual Machines ignore missing annotation classes when loading.

Usage of Google Guava was limited to ImmutableList and ImmutableSet in two classes. These references can be replaced with standard Java wrappers Collections.unmodifiableList() and Collections.unmodifiableSet(), avoiding the need for Guava entirely.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

- Removed unused Apache Commons Text
- Removed Google Guava
- Replaced Guava ImmutableList with Collection.unmodifiableList()
- Changed FindBugs annotations library to compileOnly
- Changed Log4j 2 to testImplementation
@cdisselkoen
Copy link
Contributor

Thanks for this PR!

@cdisselkoen cdisselkoen merged commit b1f4c58 into cedar-policy:main Feb 9, 2024
@exceptionfactory
Copy link
Contributor Author

Thanks for this PR!

Thanks for reviewing and merging!

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.

3 participants