@@ -76,7 +76,7 @@ public static Bytes bytes(Bytes.Encoding encoding) {
7676 * Creates an Int64 type with a big-endian encoding. The bytes are then encoded in "raw" format.
7777 */
7878 public static Int64 bigEndianInt64 () {
79- return Int64 .create (Int64 .Encoding .BigEndianBytes .create (Type . rawBytes () ));
79+ return Int64 .create (Int64 .Encoding .BigEndianBytes .create ());
8080 }
8181
8282 /** Creates an Int64 type with the specified encoding. */
@@ -200,29 +200,25 @@ public abstract static class Encoding {
200200 static Encoding fromProto (com .google .bigtable .admin .v2 .Type .Int64 .Encoding source ) {
201201 switch (source .getEncodingCase ()) {
202202 case BIG_ENDIAN_BYTES :
203- return BigEndianBytes .create (
204- Bytes .fromProto (source .getBigEndianBytes ().getBytesType ()));
203+ return BigEndianBytes .create ();
205204 case ENCODING_NOT_SET :
206- return BigEndianBytes .create (Type . rawBytes () );
205+ return BigEndianBytes .create ();
207206 }
208207 throw new UnsupportedOperationException ();
209208 }
210209
211210 @ AutoValue
212211 public abstract static class BigEndianBytes extends Encoding {
213212
214- public static BigEndianBytes create (Bytes bytes ) {
215- return new AutoValue_Type_Int64_Encoding_BigEndianBytes (bytes );
213+ public static BigEndianBytes create () {
214+ return new AutoValue_Type_Int64_Encoding_BigEndianBytes ();
216215 }
217216
218- @ Nonnull
219- public abstract Bytes getBytes ();
220-
221217 @ Override
222218 public com .google .bigtable .admin .v2 .Type .Int64 .Encoding toProto () {
223219 com .google .bigtable .admin .v2 .Type .Int64 .Encoding .Builder builder =
224220 com .google .bigtable .admin .v2 .Type .Int64 .Encoding .newBuilder ();
225- builder .getBigEndianBytesBuilder (). setBytesType ( getBytes (). toProto (). getBytesType ()) ;
221+ builder .getBigEndianBytesBuilder ();
226222 return builder .build ();
227223 }
228224 }
0 commit comments