Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AEA8C200D19 for ; Fri, 6 Oct 2017 23:50:30 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AD1E2160BDB; Fri, 6 Oct 2017 21:50:30 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 012B31609D0 for ; Fri, 6 Oct 2017 23:50:29 +0200 (CEST) Received: (qmail 41323 invoked by uid 500); 6 Oct 2017 21:50:29 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 41300 invoked by uid 99); 6 Oct 2017 21:50:28 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Oct 2017 21:50:28 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0F6B2E96ED; Fri, 6 Oct 2017 21:50:26 +0000 (UTC) From: tamaashu To: dev@zookeeper.apache.org Reply-To: dev@zookeeper.apache.org Message-ID: Subject: [GitHub] zookeeper pull request #395: ZOOKEEPER-2630: Use interface type instead of i... Content-Type: text/plain Date: Fri, 6 Oct 2017 21:50:26 +0000 (UTC) archived-at: Fri, 06 Oct 2017 21:50:30 -0000 GitHub user tamaashu opened a pull request: https://github.com/apache/zookeeper/pull/395 ZOOKEEPER-2630: Use interface type instead of implementation type whe… Use interface type instead of implementation type when appropriate. There are a couple of places in code base where we declare a field / variable as implementation type (i.e. HashMap, HashSet) instead of interface type (i.e. Map, Set), while in other places we do the opposite by declaring as interface type. A quick check indicates that most if not all of these places could be updated so we have a consistent style over the code base (prefer using interface type), which is also a good coding style to stick per best practice. Checked and fixed Set, Map and List interface usages. Author: Tamas Penzes Reviewers: Abe Fine , Michael Han Closes #354 from tamaashu/ZOOKEEPER-2630 (cherry picked from commit 1165794be9587acccc02782dbff95bc482222528) You can merge this pull request into a Git repository by running: $ git pull https://github.com/tamaashu/zookeeper ZOOKEEPER-2630-3.5 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/zookeeper/pull/395.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 #395 ---- commit 506be06474bfcfd44a0129ce6926c7512232246b Author: Tamas Penzes Date: 2017-09-11T16:55:05Z ZOOKEEPER-2630: Use interface type instead of implementation type whe… Use interface type instead of implementation type when appropriate. There are a couple of places in code base where we declare a field / variable as implementation type (i.e. HashMap, HashSet) instead of interface type (i.e. Map, Set), while in other places we do the opposite by declaring as interface type. A quick check indicates that most if not all of these places could be updated so we have a consistent style over the code base (prefer using interface type), which is also a good coding style to stick per best practice. Checked and fixed Set, Map and List interface usages. Author: Tamas Penzes Reviewers: Abe Fine , Michael Han Closes #354 from tamaashu/ZOOKEEPER-2630 (cherry picked from commit 1165794be9587acccc02782dbff95bc482222528) ---- ---