You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/01/15 21:23:39 UTC

[GitHub] [hbase] zhengzhuobinzzb commented on a change in pull request #2884: HBASE-25512 May throw StringIndexOutOfBoundsException when construct illegal tablename error

zhengzhuobinzzb commented on a change in pull request #2884:
URL: https://github.com/apache/hbase/pull/2884#discussion_r558599699



##########
File path: hbase-common/src/main/java/org/apache/hadoop/hbase/TableName.java
##########
@@ -192,16 +192,16 @@ public static void isLegalTableQualifierName(final byte[] qualifierName,
     if(end - start < 1) {
       throw new IllegalArgumentException(isSnapshot ? "Snapshot" : "Table" + " qualifier must not be empty");
     }
+    // Treat the bytes as UTF-8
+    String qualifierString = new String(

Review comment:
       Thanks!!!
   No special reason here. Just copy the origin code.
   Now I changed code to use Bytes.toString(qualifierName, start, end - start) instead of new String. 
   Is this better?




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