in foundations/foundation-protobuf/src/main/java/org/apache/servicecomb/foundation/protobuf/internal/schema/serializer/repeated/impl/ints/SInt32PackedWriteSchemas.java [29:91]
public SInt32PackedWriters(Field protoField) {
super(protoField);
primitiveArrayWriter = (o, value) -> {
if (value.length == 0) {
return;
}
o.writeObject(tag, tagSize, value, (output, array) -> {
for (int element : array) {
output.writePackedSInt32(element);
}
});
};
arrayWriter = (o, value) -> {
if (value.length == 0) {
return;
}
o.writeObject(tag, tagSize, value, (output, array) -> {
for (Integer element : array) {
if (element != null) {
output.writePackedSInt32(element);
continue;
}
ProtoUtils.throwNotSupportNullElement(protoField);
}
});
};
collectionWriter = (o, value) -> {
if (value.isEmpty()) {
return;
}
o.writeObject(tag, tagSize, value, (output, collection) -> {
for (Integer element : collection) {
if (element != null) {
output.writePackedSInt32(element);
continue;
}
ProtoUtils.throwNotSupportNullElement(protoField);
}
});
};
stringArrayWriter = (o, value) -> {
if (value.length == 0) {
return;
}
o.writeObject(tag, tagSize, value, (output, array) -> {
for (String element : array) {
if (element != null) {
int parsedValue = Integer.parseInt(element, 10);
output.writePackedSInt32(parsedValue);
continue;
}
ProtoUtils.throwNotSupportNullElement(protoField);
}
});
};
}