Forráskód Böngészése

fix creating uid to bytes

Shay Banon 13 éve
szülő
commit
2950799243
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      src/main/java/org/elasticsearch/index/mapper/Uid.java

+ 2 - 2
src/main/java/org/elasticsearch/index/mapper/Uid.java

@@ -103,8 +103,8 @@ public final class Uid {
     public static BytesRef createUidAsBytes(String type, String id) {
         BytesRef ref = new BytesRef(type.length() + 1 + id.length());
         ref.copyChars(type);
-        ref.copyBytes(DELIMITER_BYTES);
-        ref.copyChars(id);
+        ref.append(DELIMITER_BYTES);
+        ref.append(new BytesRef(id));
         return ref;
     }