Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
petrov-mg committed Nov 28, 2023
1 parent 5f2c684 commit 34af0b8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ private boolean preWrite(BinaryWriterExImpl writer, Object obj) {
* @param writer Writer.
*/
private void postWrite(BinaryWriterExImpl writer) {
writer.postWrite(userType, registered);
writer.postWrite(null, userType, registered);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,12 @@ public void preWrite(@Nullable String clsName) {
* @param userType User type flag.
* @param registered Whether type is registered.
*/
public void postWrite(boolean userType, boolean registered) {
public void postWrite(Boolean existingCompactFooter, boolean userType, boolean registered) {
short flags;
boolean useCompactFooter;

if (userType) {
if (ctx.isCompactFooter()) {
if (existingCompactFooter != null ? existingCompactFooter : ctx.isCompactFooter()) {
flags = BinaryUtils.FLAG_USR_TYP | BinaryUtils.FLAG_COMPACT_FOOTER;
useCompactFooter = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ else if (readCache == null) {
reader.position(start + BinaryUtils.length(reader, start));
}

writer.postWrite(true, registeredType);
writer.postWrite(BinaryUtils.isCompactFooter(flags), true, registeredType);

// Update metadata if needed.
int schemaId = writer.schemaId();
Expand Down

0 comments on commit 34af0b8

Please sign in to comment.