Fix CapturingOutputStream size accounting 11/104811/2
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 9 Mar 2023 18:02:02 +0000 (19:02 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 9 Mar 2023 18:54:04 +0000 (19:54 +0100)
commitad820421a6ff3a2ec7bdf626b46001bb275da73f
tree0bf827d0f6735933351cdaab09d9c4fe564d8237
parentb7f0b7d8963f24e34b5d5f98d5a21ea3b32510ab
Fix CapturingOutputStream size accounting

Superclass bulk write method is off-loading to the single-byte write
method, leading to us seeing the size as double of what it is.

Rework the class so we forward methods directly, which has the added
benefit of improving performance.

JIRA: YANGTOOLS-745
Change-Id: I725a0771c807228b193eb1cea16abc5725cd70b1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
plugin/yang-maven-plugin/src/main/java/org/opendaylight/yangtools/yang2sources/plugin/CapturingOutputStream.java