RFR: 8353757: Log class should have a proper clear() method [v2]
Archie Cobbs
acobbs at openjdk.org
Fri Apr 4 22:20:28 UTC 2025
> This is a simple refactoring to add a method `Log.clear()`, move `ReusableLog.clear()`'s clearing operations into it and invoke `super.clear()` instead, and add two more fields that should be included in the clear operation but were not because they were added to `Log` after `ReusableLog.clear()` was added and were missed.
>
> A natural question: Are there any other fields in `Log` that should be cleared in `Log.clear()`? The two I've added (`nsuppressederrors` and `nsuppressedwarns`) are the only two that weren't there when `ReusableLog` as added, so presumably not, but it's possible.
Archie Cobbs has updated the pull request incrementally with one additional commit since the last revision:
Invoke Log.useSource() before recursing into attribution.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/24460/files
- new: https://git.openjdk.org/jdk/pull/24460/files/e9931f6d..a1108ac7
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=24460&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=24460&range=00-01
Stats: 11 lines in 1 file changed: 7 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/24460.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/24460/head:pull/24460
PR: https://git.openjdk.org/jdk/pull/24460
More information about the compiler-dev
mailing list