vvysotskyi commented on a change in pull request #1397: DRILL-6633: Replace
usage of Guava classes by JDK ones
URL: https://github.com/apache/drill/pull/1397#discussion_r210883199
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/coord/zk/ZookeeperClient.java
##########
@@ -192,24 +190,24 @@ public boolean hasPath(final String path, final boolean
consistent, final DataCh
* @param consistent consistency check
* @param version version holder
*/
- public byte[] get(final String path, final boolean consistent, final
DataChangeVersion version) {
- Preconditions.checkNotNull(path, "path is required");
+ public byte[] get(String path, boolean consistent, DataChangeVersion
version) {
+ Objects.requireNonNull(path, "path is required");
- final String target = PathUtils.join(root, path);
+ String target = PathUtils.join(root, path);
if (consistent) {
try {
if (version != null) {
Stat stat = new Stat();
- final byte[] bytes =
curator.getData().storingStatIn(stat).forPath(target);
+ byte[] bytes = curator.getData().storingStatIn(stat).forPath(target);
version.setVersion(stat.getVersion());
return bytes;
}
return curator.getData().forPath(target);
- } catch (final Exception ex) {
+ } catch (Exception ex) {
Review comment:
AFAIK, there is no convention for such cases. `ex` also looks OK.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services