zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-2630) Use interface type instead of implementation type when appropriate.
Date Mon, 11 Sep 2017 17:37:00 GMT

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-2630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16161651#comment-16161651
] 

Hudson commented on ZOOKEEPER-2630:
-----------------------------------

SUCCESS: Integrated in Jenkins build ZooKeeper-trunk #3531 (See [https://builds.apache.org/job/ZooKeeper-trunk/3531/])
ZOOKEEPER-2630: Use interface type instead of implementation type whe… (hanm: rev 1165794be9587acccc02782dbff95bc482222528)
* (edit) src/java/test/org/apache/zookeeper/test/ACLTest.java
* (edit) src/java/test/org/apache/zookeeper/test/SessionTest.java
* (edit) docs/zookeeperReconfig.html
* (edit) src/java/main/org/apache/zookeeper/server/NettyServerCnxnFactory.java
* (edit) src/java/test/org/apache/zookeeper/test/FLEZeroWeightTest.java
* (edit) src/contrib/loggraph/src/java/org/apache/zookeeper/graph/servlets/Throughput.java
* (edit) src/java/main/org/apache/zookeeper/server/DataTree.java
* (edit) src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorConnectionPropertiesDialog.java
* (edit) src/java/test/org/apache/zookeeper/test/ClientBase.java
* (edit) src/java/main/org/apache/zookeeper/server/auth/ProviderRegistry.java
* (edit) src/java/test/org/apache/zookeeper/server/quorum/CommitProcessorConcurrencyTest.java
* (edit) src/java/systest/org/apache/zookeeper/test/system/BaseSysTest.java
* (edit) src/java/test/org/apache/zookeeper/server/quorum/FLEBackwardElectionRoundTest.java
* (edit) src/java/main/org/apache/jute/compiler/JFile.java
* (edit) src/java/main/org/apache/zookeeper/server/quorum/FastLeaderElection.java
* (edit) src/java/main/org/apache/zookeeper/server/quorum/Leader.java
* (edit) src/contrib/loggraph/src/java/org/apache/zookeeper/graph/FilterOp.java
* (edit) src/contrib/loggraph/src/java/org/apache/zookeeper/graph/JsonGenerator.java
* (edit) src/contrib/loggraph/src/java/org/apache/zookeeper/graph/LogEntry.java
* (edit) src/java/main/org/apache/zookeeper/server/quorum/flexible/QuorumMaj.java
* (edit) src/java/test/org/apache/zookeeper/server/quorum/ReconfigRecoveryTest.java
* (edit) src/recipes/queue/src/java/org/apache/zookeeper/recipes/queue/DistributedQueue.java
* (edit) src/java/test/org/apache/zookeeper/test/FLETest.java
* (edit) src/java/test/org/apache/zookeeper/test/QuorumBase.java
* (edit) src/java/systest/org/apache/zookeeper/test/system/InstanceManager.java
* (edit) src/java/test/org/apache/zookeeper/server/quorum/LearnerHandlerTest.java
* (edit) src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/ZooInspectorPanel.java
* (edit) src/java/main/org/apache/jute/compiler/JRecord.java
* (edit) src/java/test/org/apache/zookeeper/test/FLERestartTest.java
* (edit) src/java/test/org/apache/zookeeper/server/quorum/ReconfigFailureCasesTest.java
* (edit) src/java/test/org/apache/zookeeper/test/IntegrityCheck.java
* (edit) src/java/test/org/apache/zookeeper/test/AsyncTest.java
* (edit) src/java/test/org/apache/zookeeper/test/TruncateTest.java
* (edit) src/java/main/org/apache/zookeeper/server/quorum/CommitProcessor.java
* (edit) src/java/systest/org/apache/zookeeper/test/system/InstanceContainer.java
* (edit) src/java/main/org/apache/jute/compiler/CSharpGenerator.java
* (edit) src/java/main/org/apache/jute/compiler/JavaGenerator.java
* (edit) src/java/main/org/apache/zookeeper/Environment.java
* (edit) src/java/main/org/apache/jute/compiler/CGenerator.java
* (edit) src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java
* (edit) src/docs/src/documentation/content/xdocs/zookeeperReconfig.xml
* (edit) src/java/main/org/apache/zookeeper/common/PathTrie.java
* (edit) src/contrib/loggraph/src/java/org/apache/zookeeper/graph/MeasureThroughput.java
* (edit) src/contrib/fatjar/src/java/org/apache/zookeeper/util/FatJarMain.java
* (edit) src/java/systest/org/apache/zookeeper/test/system/QuorumPeerInstance.java
* (edit) src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java
* (edit) src/java/main/org/apache/zookeeper/server/WatchManager.java
* (edit) src/java/test/org/apache/zookeeper/test/CnxManagerTest.java
* (edit) src/java/test/org/apache/zookeeper/test/OOMTest.java
* (edit) src/java/test/org/apache/zookeeper/test/ReconfigTest.java
* (edit) src/java/test/org/apache/zookeeper/server/quorum/QuorumRequestPipelineTest.java
* (edit) src/java/main/org/apache/jute/compiler/CppGenerator.java
* (edit) src/java/test/org/apache/zookeeper/test/LocalSessionsOnlyTest.java
* (edit) src/java/main/org/apache/zookeeper/server/quorum/AuthFastLeaderElection.java


> Use interface type instead of implementation type when appropriate.
> -------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2630
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2630
>             Project: ZooKeeper
>          Issue Type: Improvement
>            Reporter: Michael Han
>            Assignee: Tamas Penzes
>            Priority: Trivial
>              Labels: newbie, refactoring
>             Fix For: 3.6.0
>
>
> 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.
> See more info on https://github.com/apache/zookeeper/pull/102



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message