Mark nested builder as clean after clear is called

Omitting this step was leading to stale cached versions of nested messages.
See https://github.com/protocolbuffers/protobuf/issues/10624
pull/10984/head
Jerry Berg 2 years ago committed by GitHub
parent 4f393bd515
commit 8e6afeff49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      java/core/src/main/java/com/google/protobuf/SingleFieldBuilderV3.java

@ -199,6 +199,9 @@ public class SingleFieldBuilderV3<
builder = null;
}
onChanged();
// After clearing, parent is dirty, but this field builder is now clean and any changes should
// trickle up.
isClean = true;
return this;
}

Loading…
Cancel
Save