protobuf
This commit is contained in:
@@ -219,7 +219,7 @@ public final class EnMember<W extends Writer, T, F> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
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()) + '}';
|
+ (encoder == null ? null : encoder.getClass().getName()) + '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public class ProtobufFactory extends ConvertFactory<ProtobufReader, ProtobufWrit
|
|||||||
"redkale.convert.nullable",
|
"redkale.convert.nullable",
|
||||||
false,
|
false,
|
||||||
Convert.FEATURE_NULLABLE),
|
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);
|
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);
|
value = objFieldFunc.apply(member.getAttribute(), obj);
|
||||||
}
|
}
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
this.writeFieldName(member);
|
if (nullable()) {
|
||||||
writeNull();
|
this.writeFieldName(member);
|
||||||
|
writeNull();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (tiny()) {
|
if (tiny()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user