You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/10/23 11:17:41 UTC

[GitHub] [dubbo-spi-extensions] everyhook1 opened a new issue #80: bug report: org.apache.dubbo.remoting.etcd.option.OptionUtil prefixEndOf

everyhook1 opened a new issue #80:
URL: https://github.com/apache/dubbo-spi-extensions/issues/80


   code branch : master
   file :  org.apache.dubbo.remoting.etcd.option.OptionUtil prefixEndOf
   line :32 
   https://github.com/apache/dubbo/blob/84d355fb1b553c7c5f01357069b13d434f60e53c/dubbo-remoting/dubbo-remoting-etcd3/src/main/java/org/apache/dubbo/remoting/etcd/option/OptionUtil.java#L32
   commit message 👍 
   [Dubbo-808] Support etcd registry (#3605)  * Merge https://github.com/dubbo/dubbo-registry-etcd into incubator-dubbo  * Add UT to ConfigurationUtilsTest
   
   code:
   public static final ByteSequence prefixEndOf(ByteSequence prefix) {
           byte[] endKey = prefix.getBytes().clone();
           for (int i = endKey.length - 1; i >= 0; i--) {
               if (endKey[i] < 0xff) {  //which is always true, please fix it 
                   endKey[i] = (byte) (endKey[i] + 1);
                   return ByteSequence.from(Arrays.copyOf(endKey, i + 1));
               }
           }
           return ByteSequence.from(NO_PREFIX_END);
       }
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org