zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tamaashu <...@git.apache.org>
Subject [GitHub] zookeeper pull request #395: ZOOKEEPER-2630: Use interface type instead of i...
Date Fri, 06 Oct 2017 21:50:26 GMT
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 <tamaas@cloudera.com>
    
    Reviewers: Abe Fine <afine@apache.org>, Michael Han <hanm@apache.org>
    
    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 <tamaas@cloudera.com>
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 <tamaas@cloudera.com>
    
    Reviewers: Abe Fine <afine@apache.org>, Michael Han <hanm@apache.org>
    
    Closes #354 from tamaashu/ZOOKEEPER-2630
    
    (cherry picked from commit 1165794be9587acccc02782dbff95bc482222528)

----


---

Mime
View raw message