Merge branch 'master' into pmd/7.0.x

This commit is contained in:
Andreas Dangel
2020-09-13 09:19:52 +02:00
2 changed files with 10 additions and 0 deletions

View File

@ -53,6 +53,8 @@ AbstractTokenizer and the custom tokenizers of Fortran, Perl and Ruby are deprec
* {% jdoc !!fortran::cpd.FortranTokenizer %}. Was replaced by an {% jdoc core::cpd.AnyTokenizer %}. Use {% jdoc !!fortran::cpd.FortranLanguage#getTokenizer() %} anyway.
* {% jdoc !!perl::cpd.PerlTokenizer %}. Was replaced by an {% jdoc core::cpd.AnyTokenizer %}. Use {% jdoc !!perl::cpd.PerlLanguage#getTokenizer() %} anyway.
* {% jdoc !!ruby::cpd.RubyTokenizer %}. Was replaced by an {% jdoc core::cpd.AnyTokenizer %}. Use {% jdoc !!ruby::cpd.RubyLanguage#getTokenizer() %} anyway.
* {% jdoc !!core::lang.rule.RuleReference#getOverriddenLanguage() %} and
{% jdoc !!core::lang.rule.RuleReference#setLanguage(net.sourceforge.pmd.lang.Language) %}
### External Contributions

View File

@ -86,13 +86,21 @@ public class RuleReference extends AbstractDelegateRule {
this.setRule(ref.getRule().deepCopy());
}
/**
* @deprecated overriding the language of a rule is not supported.
*/
@Deprecated
public Language getOverriddenLanguage() {
return language;
}
/**
* @deprecated overriding the language of a rule is not supported.
*/
// FIXME should we really allow overriding the language of a rule?
// I don't see any case where this wouldn't just make the rule fail during execution
@Override
@Deprecated
public void setLanguage(Language language) {
// Only override if different than current value, or if already
// overridden.