Skip to content

Collapse the single-subclass ReplayLogger base into ReplayLoggerImpl #7673

Description

@aglinxinyuan

Task Summary

Once #7452 removes EmptyReplayLogger, the abstract base ReplayLogger has exactly one subclass and no declared-type site anywhere in the repo. ReplayLogManagerImpl builds it as new ReplayLoggerImpl(), so the inferred type is the concrete class — the base is never named as a type.

Symbol Location Subclasses Declared-type sites
ReplayLogger amber/.../engine/architecture/logreplay/ReplayLogger.scala:28 1 0
ReplayLogManager.scala:109  private val replayLogger = new ReplayLoggerImpl()  -> inferred ReplayLoggerImpl
ReplayLoggerImpl.scala:31   class ReplayLoggerImpl extends ReplayLogger        -> the only subclass
ReplayLogger.scala:28       abstract class ReplayLogger                        -> nothing else refers to it

The change: drop extends ReplayLogger from ReplayLoggerImpl, keep its three method bodies as they are, and delete ReplayLogger.scala. Roughly −40 lines, no behaviour change.

Raised as an advisory while reviewing #7452, under the "introduce an abstraction at the second use" standard. Kept out of that PR because this edits live code, whereas #7452 is a pure dead-code deletion.

Verification, once #7452 has merged:

git grep -n "ReplayLogger\b" -- '*.scala'   # only the declaration and the one extends

Task Type

  • Refactor / Cleanup

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions