curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Cohrs (JIRA)" <>
Subject [jira] [Created] (CURATOR-85) curator-client ConnectionState uses deprecated Closeables method
Date Thu, 23 Jan 2014 22:41:38 GMT
Dave Cohrs created CURATOR-85:

             Summary: curator-client ConnectionState uses deprecated Closeables method
                 Key: CURATOR-85
             Project: Apache Curator
          Issue Type: Bug
          Components: Client
    Affects Versions: 2.3.0
            Reporter: Dave Cohrs

Tried to upgrade to guava 16 and started getting these errors from Curator on exit:

Exception in thread "Thread-1" java.lang.NoSuchMethodError:;)V
	at org.apache.curator.ConnectionState.close(
	at org.apache.curator.CuratorZookeeperClient.close(
	at org.apache.curator.framework.imps.CuratorFrameworkImpl.close(
	at com.virident.fmc.service.AbstractService.closeCF(
	at com.virident.fmc.service.AbstractService.shutdown(
	at com.virident.fmc.service.AbstractService.access$000(
	at com.virident.fmc.service.AbstractService$
tail: /var/lib/vgccluster/manager.out: file truncated

Investigation shows that this code:

    public void close() throws IOException


This closeQuietly() method is deprecated as of guava 14, and it gone in guava 16.  The 2-parameter
closeQuietly() needs to be called, eg:

        Closeables.closeQuietly(ensembleProvider, true);

Curator trunk source still seems to have this bug.  The 2-parameter closeQuietly should already
be available in guava 14.

This message was sent by Atlassian JIRA

View raw message