315157973 opened a new pull request #10713:
URL: https://github.com/apache/pulsar/pull/10713


   ### Motivation
   Now `LongPairRangeSet` has two implementation classes: 
ConcurrentOpenLongPairRangeSet and DefaultRangeSet
   But their behavior in some methods is inconsistent, such as: firstRange, 
lastRange
   
   If there is no data, in ConcurrentOpenLongPairRangeSet, the above two 
methods will return null.
   NoSuchElementException will be thrown in DefaultRangeSet, which is the 
default behavior of Guava Range.
   
   When I was using this interface, it was very troublesome to deal with 
abnormal scenarios. I needed to determine whether it was null and add 
try-catch, so it is better to make the behavior of the current implementation 
class consistent.
   
   Either throw an exception or return null, I chose to return null
   
   ### Modifications
   
   
   ### Verifying this 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:
[email protected]


Reply via email to