Skip to content

Commit f4ab884

Browse files
rahulKQLsduskis
authored andcommitted
Updated UnsafeByteOperations.unsafeWrap to ByteString.copyFrom (#5473)
Fixes #5030 Updated `UnsafeByteOperations.unsafeWrap` as this is still a `@ExperimentalApi`.
1 parent 0a8ffec commit f4ab884

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models

google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Range.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import com.google.common.base.Objects;
2020
import com.google.common.base.Preconditions;
2121
import com.google.protobuf.ByteString;
22-
import com.google.protobuf.UnsafeByteOperations;
2322
import java.io.IOException;
2423
import java.io.ObjectInputStream;
2524
import java.io.ObjectOutputStream;
@@ -360,7 +359,7 @@ public static ByteStringRange prefix(ByteString prefix) {
360359
}
361360

362361
ByteString endPrefix = offset == 0 ? ByteString.EMPTY : prefix.substring(0, offset);
363-
ByteString endSuffix = UnsafeByteOperations.unsafeWrap(new byte[] {(byte) (curByte + 1)});
362+
ByteString endSuffix = ByteString.copyFrom(new byte[] {(byte) (curByte + 1)});
364363
ByteString end = endPrefix.concat(endSuffix);
365364

366365
ByteStringRange range = ByteStringRange.unbounded().startClosed(prefix);

0 commit comments

Comments
 (0)