protobuf
This commit is contained in:
@@ -219,7 +219,7 @@ public final class EnMember<W extends Writer, T, F> {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "EnMember{" + "attribute=" + attribute.field() + ", position=" + position + ", encoder="
|
||||
return "EnMember{" + "attribute=" + attribute.field() + ", position=" + position + ", tag=" + tag + ", encoder="
|
||||
+ (encoder == null ? null : encoder.getClass().getName()) + '}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public class ProtobufFactory extends ConvertFactory<ProtobufReader, ProtobufWrit
|
||||
"redkale.convert.nullable",
|
||||
false,
|
||||
Convert.FEATURE_NULLABLE),
|
||||
Boolean.parseBoolean(System.getProperty("redkale.convert.protobuf.enumtostring", "true")));
|
||||
Boolean.parseBoolean(System.getProperty("redkale.convert.protobuf.enumtostring", "false")));
|
||||
|
||||
static final Decodeable objectDecoder = instance.loadDecoder(Object.class);
|
||||
|
||||
|
||||
@@ -410,8 +410,10 @@ public class ProtobufWriter extends Writer implements ByteTuple {
|
||||
value = objFieldFunc.apply(member.getAttribute(), obj);
|
||||
}
|
||||
if (value == null) {
|
||||
this.writeFieldName(member);
|
||||
writeNull();
|
||||
if (nullable()) {
|
||||
this.writeFieldName(member);
|
||||
writeNull();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (tiny()) {
|
||||
|
||||
Reference in New Issue
Block a user