GitHub user tamaashu opened a pull request:
https://github.com/apache/zookeeper/pull/354
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.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tamaashu/zookeeper ZOOKEEPER-2630
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zookeeper/pull/354.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 #354
----
commit c9ab1da4cfc8bc30e3a93df08e0d865532f9fb40
Author: Tamas Penzes <[email protected]>
Date: 2017-08-31T15:10:33Z
ZOOKEEPER-2630: Use interface type instead of implementation type when
appropriate.
Checked and fixed Set, Map and List interface usages.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---