zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] eolivelli commented on a change in pull request #839: ZOOKEEPER-3290: Throw detailed KeeperException when multi-op failed
Date Sat, 24 Aug 2019 22:12:40 GMT
eolivelli commented on a change in pull request #839: ZOOKEEPER-3290: Throw detailed KeeperException
when multi-op failed
URL: https://github.com/apache/zookeeper/pull/839#discussion_r317375493
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/OpResult.java
 ##########
 @@ -282,33 +283,42 @@ public int hashCode() {
      */
     public static class ErrorResult extends OpResult {
 
-        private int err;
+        private final int err;
+        private final String path;
 
         public ErrorResult(int err) {
+            this(err, null);
+        }
+
+        public ErrorResult(int err, String path) {
             super(ZooDefs.OpCode.error);
             this.err = err;
+            this.path = path;
         }
 
         public int getErr() {
             return err;
         }
 
+        public String getPath() {
+            return path;
+        }
+
         @Override
         public boolean equals(Object o) {
             if (this == o) {
                 return true;
             }
-            if (!(o instanceof ErrorResult)) {
+            if (o == null || getClass() != o.getClass()) {
 
 Review comment:
   why are you changing this line ?

----------------------------------------------------------------
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