RFR: 8294293: Remove unused _width and _newlines field in outputStream [v2]

Johan Sjölen jsjolen at openjdk.org
Tue Sep 27 07:27:27 UTC 2022


On Tue, 27 Sep 2022 05:54:28 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> It does seem that way. The `outputStream::write` method is the function which all subclasses of `outputStream` implements, so we shouldn't remove this function without removing `xmlTextStream`. That's probably a separate RFE, and perhaps not desirable as it'd require merging the class into  `defaultStream`.
>
> I'm confused by this part of the change. How can the original code call `xmlTextStream::write` without an instance of `xmlTextStream` to apply it to???

`defaultStream` inherits from `xmlTextStream` and `defaultStream::write` exists, so this specifies to call the superclass method, and not its own method. In long form: `this->xmlTextStream::write` (haven't attempted to compile)

-------------

PR: https://git.openjdk.org/jdk/pull/10411


More information about the hotspot-dev mailing list