You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2020/12/18 13:12:20 UTC

[GitHub] [hadoop] dgzdot commented on a change in pull request #2545: HADOOP-17430. Add clear bytes logic for hadoop Text

dgzdot commented on a change in pull request #2545:
URL: https://github.com/apache/hadoop/pull/2545#discussion_r545821814



##########
File path: hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/Text.java
##########
@@ -226,6 +226,12 @@ public void set(String string) {
    * Set to a utf8 byte array.
    */
   public void set(byte[] utf8) {
+    if(utf8.length == 0){
+      bytes = EMPTY_BYTES;
+      length = 0;
+      textLength = -1;
+      return;

Review comment:
       Thank you for your advice. I'll fix it




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



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org