)]}'
{
  "commit": "cdfc16818459f545fbacc6ffb6de2abc6dca67f7",
  "tree": "f0999c80f110605b612cc33ecb0c135cb54ce1ee",
  "parents": [
    "33d4ac4064297d5ca8773dafddda20f65d42da6a"
  ],
  "author": {
    "name": "Mark Hansen",
    "email": "markhansen@google.com",
    "time": "Thu Oct 03 00:35:47 2024 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Thu Oct 03 00:39:51 2024 -0700"
  },
  "message": "Add tests for OutOfSpaceException in CodedOutputStream.OutputStreamEncoder.\n\nPreviously, we didn\u0027t test for OutOfSpaceException, because all writes were buffered. The OutOfSpaceException wouldn\u0027t happen until flushing.\n\nIf we flush the stream, we can detect OutOfSpaceException.\n\nFurther, I saw some tests saying \"If streaming, try different block sizes.\" These tests used block size (1, 2, 4, 8, 16), which are all less than the minimum block size of 20. So all these were rounded up to 20, and were not doing much useful: http://google3/third_party/java_src/protobuf/current/java/com/google/protobuf/CodedOutputStream.java;l\u003d2280;rcl\u003d679381814.\n\nI\u0027ve replaced such loops with a two OutputTypes:\n- STREAM, which has a buffer of the size of the output\n- STREAM_MINIMUM_BUFFER_SIZE, which has a buffer size 20\n\nThis allows deleting some extra duplicated code.\n\nPiperOrigin-RevId: 681756512\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7d32e551919565a2893522819a202f60d6a29c9a",
      "old_mode": 33188,
      "old_path": "java/core/src/test/java/com/google/protobuf/CodedOutputStreamTest.java",
      "new_id": "98f189f89c1dde9998611cdf404649c1888c47e2",
      "new_mode": 33188,
      "new_path": "java/core/src/test/java/com/google/protobuf/CodedOutputStreamTest.java"
    }
  ]
}
