Skip to content

Commit

Permalink
增加空指针判断
Browse files Browse the repository at this point in the history
  • Loading branch information
entropy-cloud committed Oct 2, 2024
1 parent c1bacf3 commit 3cd6ada
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected void writeString(IRecordBinaryOutput out, String str, Charset charset)

@Override
protected IBitSet writeTags(IRecordBinaryOutput out, RecordFieldMeta field, RecordObjectMeta typeMeta, Object value) throws IOException {
IFieldTagBinaryCodec codec = resolveTagBinaryCodec(field, registry);
IFieldTagBinaryCodec codec = field == null ? null : resolveTagBinaryCodec(field, registry);
if (codec == null)
return null;
return codec.encodeTags(out, value, field, typeMeta, context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ protected void writeString(IRecordTextOutput out, String str, Charset charset) t

@Override
protected IBitSet writeTags(IRecordTextOutput out, RecordFieldMeta field, RecordObjectMeta typeMeta, Object value) throws IOException {
IFieldTagTextCodec codec = resolveTagTextCodec(field, registry);
IFieldTagTextCodec codec = field == null ? null : resolveTagTextCodec(field, registry);
if (codec == null)
return null;
return codec.encodeTags(out, value, field, typeMeta, context);
Expand Down

0 comments on commit 3cd6ada

Please sign in to comment.