[ 
https://issues.apache.org/jira/browse/CURATOR-200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15808439#comment-15808439
 ] 

ASF GitHub Bot commented on CURATOR-200:
----------------------------------------

GitHub user Randgalt opened a pull request:

    https://github.com/apache/curator/pull/190

    [CURATOR-200] Shade Guava into Curator

    Shaded Guava into Curator Client (and Curator Test) so that it's no longer 
an issue for users. This should have been done a long time ago. Unfortunately, 
com.google.common.base.Function, com.google.common.base.Predicate and 
com.google.common.reflect.TypeToken are in Curator's public API so those 3 
classes are NOT shaded. However, this won't be a problem because there's no 
reason to think that Guava will change or remove these basic interfaces.
    
    NOTE: I've tested this by creating a temp project that uses Guava 21.0-rc2. 
When used with Curator 2.11.1 I get a NoSuchMethodError. When used with this 
new shaded version of Curator there are no errors. 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/curator CURATOR-200

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/curator/pull/190.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #190
    
----
commit fb277f9601411427dee7d26dd2be76941d38c0c3
Author: randgalt <[email protected]>
Date:   2017-01-08T00:59:07Z

    Shaded Guava into Curator Client (and Curator Test) so that it's no longer 
an issue for users. This should have been done a long time ago. Unfortunately, 
com.google.common.base.Function, com.google.common.base.Predicate and 
com.google.common.reflect.TypeToken are in Curator's public API so those 3 
classes are NOT shaded. However, this won't be a problem because there's no 
reason to think that Guava will change or remove these basic interfaces

----


> Proposal: Remove references to guava library from public APIs
> -------------------------------------------------------------
>
>                 Key: CURATOR-200
>                 URL: https://issues.apache.org/jira/browse/CURATOR-200
>             Project: Apache Curator
>          Issue Type: Improvement
>          Components: Framework
>            Reporter: Mike Drob
>             Fix For: 3.2.2, 2.11.2
>
>
> There was a good discussion on the mailing list: 
> http://curator.markmail.org/thread/yjete2ozm32jmz5u
> The critical portion copied here:
> {quote}
> The problem classes that I have found are:
> * curator-framework: org.apache.curator.framework.listen.ListenerContainer : 
> method forEach takes a parameter of type com.google.common.base.Function
> * curator-framework: 
> org.apache.curator.framework.api.transaction.CuratorTransactionResult : 
> method ofTypeAndPath returns com.google.common.base.Predicate
> * curator-x-discovery-server: 
> org.apache.curator.x.discovery.server.contexts.GenericDiscoveryContext : 
> constructor takes param of type com.google.common.reflect.TypeToken
> * curator-x-discovery: org.apache.curator.x.discovery.InstanceFilter : 
> inherits from com.google.common.base.Predicate
> {quote}
> In the ensuing discussion, it sounded like we'd need to get started on an 
> implementation before we had enough information to determine whether the 
> changes are too intrusive or not.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to