treasure-data / td-client-java

Java Client Library for Treasure Data
http://docs.treasuredata.com/articles/java
Apache License 2.0
12 stars 22 forks source link

Deprecate Guava Multimap and Function in favor of JDK & Remove Guava collections #217

Closed exoego closed 1 year ago

exoego commented 1 year ago

Part of #135

This is the final Guava deprecation and removal. After this PR and a new minor version cut, I think we could delete the deprecated one and guava dependency.

The problem is Multimap<K, V>. How should we remove it? Possible directions:

  1. Just replace it with Map<K, Collection<V>> and introduce breaking change aggressively.
  2. Add new overloads with Map<K, Col<V>> and deprecate the old methods with Muiltimap.
    • In this direction, some classes require new members to avoid conflict with TDClientConfig#headers and TDApiRequest#getHeaderParams(). See new members ~V2.

I propose picking 2nd since it helps users to migrate. WDYT?

xerial commented 1 year ago

I've searched our internal repo and found a lot of setHeader(Multimap) usage. So 2 looks better.

xerial commented 1 year ago

Thanks. I'll take a look

xerial commented 1 year ago

ok. Basically LGTM. @exoego Only one suggestion to use a normal method name without any version suffix https://github.com/treasure-data/td-client-java/pull/217/files#r1119311242