Skip to content

[all] Breaking API changes for 7.0.0 #881

@oowekyala

Description

@oowekyala

List of breaking API changes and deprecated APIs to be removed for 7.0.0:

  • Make AbstractJspNode, AbstractVFNode, and AbstractLombokAwareRule abstract classes
  • Remove default implementation of getXPathNodeName from AbstractNode
  • The toString methods of nodes can be repurposed as soon as 7.0.0 to output more useful debugging info, see [core] Add getXPathNodeName to the Node interface #879
  • Move JavaQualifiedName out of the net.sourceforge.pmd.lang.java.ast, as it's not part of the AST in any way.
  • Add method getFormalParameters() in interface ASTMethodOrConstructorDeclaration
  • change return type of Object getNextToken(); in n.s.p.lang.TokenManager to GenericToken or even T (with <T extends GenericToken>). See [core] Refactor CPD token filtering #1039

Deprecated APIs:

  • AbstractNode.hasDecendantOfAnyType
  • n.s.pmd.util.viewer.gui (old ast viewer)
  • n.s.pmd.util.designer (old designer)
  • PMD.VERSION
    • deprecated on master
    • removed in pmd/7.0.x via 9d1c186
  • RuleSetFactory(ClassLoader, RulePriority, boolean, boolean)
  • Previous rule dependency accessors:
    • Rule.usesDFA, Rule.usesTypeResolution, Rule.usesMultifile, Rule.usesRuleChain
    • Rule.setUsesDFA, Rule.setUsesTypeResolution, Rule.setUsesMultifile
    • Implementations in AbstractRule and AbstractDelegateRule
  • Old benchmark API, in n.s.pmd.benchmark:
    • Benchmark
    • Benchmarker
    • BenchmarkReport
    • BenchmarkResult
    • RuleDuration
    • StringBuilderCR
    • TextReport
  • StringUtil members:
    • startsWithAny
    • isNotEmpty
    • isEmpty
    • isMissing
    • areSemanticEquals
    • replaceString (2 overloads)
    • substringsOf(2 overloads)
    • asStringOn (2 overloads)
    • lpad
  • CollectionUtil members (IIRC some of these implementations should be moved to the eclipse plugin)
    • arraysAreEqual
    • valuesAreTransitivelyEqual
    • areEqual
    • areSemanticEquals
    • addWithoutDuplicates (2 overloads)
  • Property constructors (it may make sense to deprecate some other ones too)
    • EnumeratedProperty<E>(String, String, String[], E[], int, float)
    • EnumeratedProperty<E>(String, String, String[], E[], int, Class<E>, float)
  • PMDParameters. transformParametersIntoConfiguration
  • net.sourceforge.pmd.pmd.dcd.graph.MemberNode.equals(...)
  • ASTConstructorDeclaration.getParameters()
  • deprecate Node's <T> void findDescendantsOfType(Class<T> targetType, List<T> results, boolean crossFindBoundaries)
  • deprecate Node's <T> void findDescendantsOfType(Class<T> targetType, List<T> results, boolean crossFindBoundaries)
  • add public <T> List<T> findDescendantsOfType(final Class<T> targetType, final boolean crossBoundaries) to Node
  • Remove class net.sourceforge.pmd.util.log.ConsoleLogHandler entirely (see [core] Log only once all messages #1045)
  • Make net.sourceforge.pmd.lang.java.ast.ASTFormalParameter::setVarargs() package-private
    • Actually every setXX method of AST nodes that's only used by the parser should be made package private
  • Remove class net.sourceforge.pmd.lang.java.xpath.TypeOfFunction entirely
  • Remove all overloads of typeof from net.sourceforge.pmd.lang.java.xpath.JavaFunctions
  • Remove isA, isEither and isNeither from net.sourceforge.pmd.lang.java.typeresolution.TypeHelper
  • Remove CommentUtil (see [java] Deprecated CommentUtil, move implementation to AST Comment #1198, [java] Update comment rules for java #2802)
  • Remove AbstractCommentRule.tagsIndicesIn() (see [java] Deprecated CommentUtil, move implementation to AST Comment #1198, [java] Update comment rules for java #2802)
  • ASTImportDeclaration should no longer be a TypeNode
  • ASTImportDeclaration's setImportOnDemand and setStatic should be made package-private
  • Remove ASTConditionalExpression.setTernary and ASTConditionalExpression.isTernary
  • Remove package net.sourceforge.pmd.lang.dfa.report (see [core] Deprecate ReportTree #1283)
  • Remove deprecated apex visit(ApexNode<?>...) (see [apex] Fix class cast exceptions when using javadoc #1408)

Open

Remaining tasks:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions