Return-Path: X-Original-To: apmail-curator-dev-archive@minotaur.apache.org Delivered-To: apmail-curator-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B6F0910634 for ; Fri, 24 Jan 2014 01:39:05 +0000 (UTC) Received: (qmail 85130 invoked by uid 500); 24 Jan 2014 01:39:05 -0000 Delivered-To: apmail-curator-dev-archive@curator.apache.org Received: (qmail 85088 invoked by uid 500); 24 Jan 2014 01:39:04 -0000 Mailing-List: contact dev-help@curator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@curator.apache.org Delivered-To: mailing list dev@curator.apache.org Received: (qmail 85045 invoked by uid 99); 24 Jan 2014 01:39:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jan 2014 01:39:04 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 24 Jan 2014 01:39:01 +0000 Received: (qmail 84240 invoked by uid 99); 24 Jan 2014 01:38:39 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jan 2014 01:38:39 +0000 Date: Fri, 24 Jan 2014 01:38:39 +0000 (UTC) From: "Dave Cohrs (JIRA)" To: dev@curator.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CURATOR-85) curator-client ConnectionState uses deprecated Closeables method MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CURATOR-85?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dave Cohrs updated CURATOR-85: ------------------------------ Component/s: Recipes Framework > curator-client ConnectionState uses deprecated Closeables method > ---------------------------------------------------------------- > > Key: CURATOR-85 > URL: https://issues.apache.org/jira/browse/CURATOR-85 > Project: Apache Curator > Issue Type: Bug > Components: Client, Framework, Recipes > Affects Versions: 2.2.0-incubating, 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: com.google.common.io.Closeables.closeQuietly(Ljava/io/Closeable;)V > at org.apache.curator.ConnectionState.close(ConnectionState.java:109) > at org.apache.curator.CuratorZookeeperClient.close(CuratorZookeeperClient.java:196) > at org.apache.curator.framework.imps.CuratorFrameworkImpl.close(CuratorFrameworkImpl.java:284) > at com.virident.fmc.service.AbstractService.closeCF(AbstractService.java:199) > at com.virident.fmc.service.AbstractService.shutdown(AbstractService.java:215) > at com.virident.fmc.service.AbstractService.access$000(AbstractService.java:31) > at com.virident.fmc.service.AbstractService$1.run(AbstractService.java:98) > tail: /var/lib/vgccluster/manager.out: file truncated > Investigation shows this code: > public void close() throws IOException > { > log.debug("Closing"); > Closeables.closeQuietly(ensembleProvider); > 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 master source still seems to have this bug. The 2-parameter closeQuietly is already be available in guava-14 and the 1-parameter version is marked decorated as deprecated in that release which should have generated deprecation warnings. > A visual inspection of the various curator projects shows that this deprecated API is used in many places. They all should be corrected to use the 2-parameter Closeables.closeQuietly(). -- This message was sent by Atlassian JIRA (v6.1.5#6160)