|
|
@ -75,7 +75,7 @@ public abstract class GeneratedMessage extends AbstractMessage { |
|
|
|
final Descriptor descriptor = internalGetFieldAccessorTable().descriptor; |
|
|
|
final Descriptor descriptor = internalGetFieldAccessorTable().descriptor; |
|
|
|
for (final FieldDescriptor field : descriptor.getFields()) { |
|
|
|
for (final FieldDescriptor field : descriptor.getFields()) { |
|
|
|
if (field.isRepeated()) { |
|
|
|
if (field.isRepeated()) { |
|
|
|
final List value = (List) getField(field); |
|
|
|
final List<?> value = (List<?>) getField(field); |
|
|
|
if (!value.isEmpty()) { |
|
|
|
if (!value.isEmpty()) { |
|
|
|
result.put(field, value); |
|
|
|
result.put(field, value); |
|
|
|
} |
|
|
|
} |
|
|
@ -652,7 +652,6 @@ public abstract class GeneratedMessage extends AbstractMessage { |
|
|
|
final UnknownFieldSet.Builder unknownFields, |
|
|
|
final UnknownFieldSet.Builder unknownFields, |
|
|
|
final ExtensionRegistryLite extensionRegistry, |
|
|
|
final ExtensionRegistryLite extensionRegistry, |
|
|
|
final int tag) throws IOException { |
|
|
|
final int tag) throws IOException { |
|
|
|
final ExtendableMessage<MessageType> message = internalGetResult(); |
|
|
|
|
|
|
|
return AbstractMessage.Builder.mergeFieldFrom( |
|
|
|
return AbstractMessage.Builder.mergeFieldFrom( |
|
|
|
input, unknownFields, extensionRegistry, this, tag); |
|
|
|
input, unknownFields, extensionRegistry, this, tag); |
|
|
|
} |
|
|
|
} |
|
|
@ -821,7 +820,6 @@ public abstract class GeneratedMessage extends AbstractMessage { |
|
|
|
* If the extension is an embedded message or group, returns the default |
|
|
|
* If the extension is an embedded message or group, returns the default |
|
|
|
* instance of the message. |
|
|
|
* instance of the message. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@SuppressWarnings("unchecked") |
|
|
|
|
|
|
|
public Message getMessageDefaultInstance() { |
|
|
|
public Message getMessageDefaultInstance() { |
|
|
|
return messageDefaultInstance; |
|
|
|
return messageDefaultInstance; |
|
|
|
} |
|
|
|
} |
|
|
@ -1137,7 +1135,7 @@ public abstract class GeneratedMessage extends AbstractMessage { |
|
|
|
// 2) Insures that the caller cannot modify the list later on and
|
|
|
|
// 2) Insures that the caller cannot modify the list later on and
|
|
|
|
// have the modifications be reflected in the message.
|
|
|
|
// have the modifications be reflected in the message.
|
|
|
|
clear(builder); |
|
|
|
clear(builder); |
|
|
|
for (final Object element : (List) value) { |
|
|
|
for (final Object element : (List<?>) value) { |
|
|
|
addRepeated(builder, element); |
|
|
|
addRepeated(builder, element); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|