eolivelli commented on a change in pull request #12872:
URL: https://github.com/apache/pulsar/pull/12872#discussion_r757710770



##########
File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ResetCursorData.java
##########
@@ -43,6 +43,21 @@ public ResetCursorData(long ledgerId, long entryId, boolean 
isExcluded) {
         this.isExcluded = isExcluded;
     }
 
+    // Private constructor used only for json deserialization
+    private ResetCursorData(String position) {
+        if ("latest".equals(position)) {
+            this.ledgerId = Long.MAX_VALUE;
+            this.entryId = Long.MAX_VALUE;
+        } else if ("earliest".equals(position)) {
+            this.ledgerId = -1;
+            this.entryId = -1;
+        } else {
+            throw new IllegalArgumentException(

Review comment:
       It looks like we are not supporting the same encoding of MessageIdImpl 
and you are only supporting the two constant values.
   
   Am I missing something?




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

To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to