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

Remove the dependency on Google Guava #9

Open
leakingtapan opened this issue Nov 12, 2015 · 2 comments
Open

Remove the dependency on Google Guava #9

leakingtapan opened this issue Nov 12, 2015 · 2 comments

Comments

@leakingtapan
Copy link
Owner

in favor of Java 8 lambda

@overholts
Copy link
Collaborator

overholts commented Mar 13, 2018

Just took a look at this. We're using the following pieces of functionality:

  • Guava functional interfaces (can be replaced with java.util.function.* interfaces)
  • Preconditions#checkNotNull (can be replaced with Objects#requireNonNull)
  • Collection Utilities are used to instantiate various collections implementations (can just initialize directly)
  • Immutable Collections are used in the following places
    • default supplier config
    • supplier-driven basic object factory
    • orchestrating (default) object factory
    • collections factory methods

There isn't a language-provided drop in replacement for Guava's immutable collections. Java's native "unmodifiable collections" have some disadvantages.

That being said, we aren't really leveraging any non-trivial Guava functionality besides returning Immutable collections. Do you think it makes sense to keep it or drop it?

(Also if we keep it, worth adding a note to the documentation that it should be fine to override at runtime with more or less any version of Guava - I've been asked about that)

@leakingtapan
Copy link
Owner Author

How is overriding with any version of Guava possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants