Skip to content

Add missing @Deprecated annotations on three legacy classes#76

Merged
alexeid merged 1 commit into
masterfrom
fix/missing-deprecated-annotations
May 13, 2026
Merged

Add missing @Deprecated annotations on three legacy classes#76
alexeid merged 1 commit into
masterfrom
fix/missing-deprecated-annotations

Conversation

@alexeid
Copy link
Copy Markdown
Member

@alexeid alexeid commented May 7, 2026

Summary

Three classes have spec replacements (or in the PriorInputEditor case, are tied to an already-deprecated wrapper) but are missing the @Deprecated annotation:

  • BactrianIntervalOperator — already has a @deprecated Javadoc pointing at beast.base.spec.inference.operator.uniform.IntervalOperator, but no annotation. Tooling and IDE warnings rely on the annotation, not the Javadoc tag.
  • BranchRateModel.Base — the legacy abstract base. Spec replacement at beast.base.spec.evolution.branchratemodel.Base.
  • PriorInputEditor — BEAUti editor for the already-deprecated Prior wrapper. Not needed under the spec framework where distributions take a param input directly.

Each gains a Javadoc @deprecated pointer to the spec replacement (where one exists) and the @Deprecated annotation itself. Twelve added lines, no logic changes.

Why it matters

Found via the beast3-migration analyzer, which uses @Deprecated as the canonical signal for "this class has been replaced." Without these annotations the analyzer can't warn downstream packages (BEASTLabs, sampled-ancestors, flc, …) that they're extending a class slated for removal, and IDEs can't show the strikethrough on usages.

Test plan

  • mvn -q -DskipTests compile — clean
  • mvn -q -DskipTests test-compile — clean
  • Maintainer review of the chosen spec replacement targets in the Javadoc

Three classes have spec replacements (or, for PriorInputEditor, an
already-deprecated wrapper) but were missing the @deprecated annotation:

  * BactrianIntervalOperator — already had a @deprecated Javadoc
    pointing at beast.base.spec.inference.operator.uniform.IntervalOperator,
    but no annotation. The annotation is what tooling reads.
  * BranchRateModel.Base — the legacy abstract base. Spec replacement at
    beast.base.spec.evolution.branchratemodel.Base.
  * PriorInputEditor — BEAUti editor for the already-deprecated Prior
    wrapper; no longer needed under the spec framework where
    distributions take a param input directly.

Found via the beast3-migration analyzer, which uses @deprecated as the
ground truth for "this class has been replaced". Without these
annotations the analyzer (and IDEs) can't warn downstream packages
that they're extending a class slated for removal.
@alexeid alexeid requested review from rbouckaert and walterxie May 8, 2026 01:09
@alexeid alexeid merged commit 9ea4937 into master May 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant