Add missing @Deprecated annotations on three legacy classes#76
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three classes have spec replacements (or in the
PriorInputEditorcase, are tied to an already-deprecated wrapper) but are missing the@Deprecatedannotation:BactrianIntervalOperator— already has a@deprecatedJavadoc pointing atbeast.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 atbeast.base.spec.evolution.branchratemodel.Base.PriorInputEditor— BEAUti editor for the already-deprecatedPriorwrapper. Not needed under the spec framework where distributions take aparaminput directly.Each gains a Javadoc
@deprecatedpointer to the spec replacement (where one exists) and the@Deprecatedannotation itself. Twelve added lines, no logic changes.Why it matters
Found via the beast3-migration analyzer, which uses
@Deprecatedas 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— cleanmvn -q -DskipTests test-compile— clean