zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] symat commented on issue #1056: ZOOKEEPER-3495: fix SnapshotDigestTest to work with JDK12+
Date Wed, 21 Aug 2019 12:34:55 GMT
symat commented on issue #1056: ZOOKEEPER-3495: fix SnapshotDigestTest to work with JDK12+
URL: https://github.com/apache/zookeeper/pull/1056#issuecomment-523436622
 
 
   > Also DigestCalculator is not only used in DataTree, it will also being used in PrepRequestProcessor
...
   
   Thanks for pointing this out! Let's wait for your PR to be submitted / merged, before finalizing
this one. Can you link the jira ticket / PR here?
   
   
   > The DIGEST_VERSION is made to be static final to make sure it won't be changed in
code with things like setVersion.
   
   I think with the solution proposed by @anmolnar it is still possible to keep the DIGEST_VERSION
to be static final and make it impossible to change it from the code accidentally. We only
create a default constructor for `DataTree`, injecting the static final DigestCalculator singleton.
While for some tests, we can create a `DataTree` with a mocked DigestCalculator. (I think
this approach is cleaner in terms of object-oriented design patterns, as the DigestCalculator
is actually a dependency of the DataTree, but it is hidden in the current implementation.)
   
   I will submit a new commit here, trying out @anmolnar's proposal, then we can see if everyone
likes it or not :) - but let's wait with the merge until I merged with @lvfangmin's change...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message