File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1 Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1515 */
1616package com .google .cloud .bigquery .storage .v1 ;
1717
18+ import com .google .protobuf .DescriptorProtos .FieldOptions ;
1819import com .google .protobuf .Descriptors .FieldDescriptor ;
20+ import com .google .protobuf .ExtensionLite ;
1921import java .nio .charset .StandardCharsets ;
2022import java .util .Base64 ;
2123
@@ -74,8 +76,12 @@ public static String generatePlaceholderFieldName(String fieldName) {
7476 * @return columnName annotation if present, otherwise return the field name.
7577 */
7678 public static String getFieldName (FieldDescriptor fieldDescriptor ) {
77- return fieldDescriptor .getOptions ().hasExtension (AnnotationsProto .columnName )
78- ? fieldDescriptor .getOptions ().getExtension (AnnotationsProto .columnName )
79+ return fieldDescriptor
80+ .getOptions ()
81+ .hasExtension ((ExtensionLite <FieldOptions , String >) AnnotationsProto .columnName )
82+ ? fieldDescriptor
83+ .getOptions ()
84+ .getExtension ((ExtensionLite <FieldOptions , String >) AnnotationsProto .columnName )
7985 : fieldDescriptor .getName ();
8086 }
8187}
You can’t perform that action at this time.
0 commit comments