[java] Deprecate ASTImportDeclaration#getPackage(), refs #1888

This commit is contained in:
Andreas Dangel
2019-07-28 18:35:12 +02:00
parent a651514e56
commit 295759456d
2 changed files with 10 additions and 2 deletions

View File

@ -18,6 +18,13 @@ This is a {{ site.pmd.release_type }} release.
### API Changes
#### Deprecated APIs
##### For removal
* The method {% jdoc java::ast.ASTImportDeclaration#getPackage() %} has been deprecated and
will be removed with PMD 7.0.0.
### External Contributions
{% endtocmaker %}

View File

@ -153,9 +153,10 @@ public class ASTImportDeclaration extends AbstractJavaTypeNode {
* type or method imported by this declaration. This may be null if the
* auxclasspath is not correctly set, as this method depends on correct
* type resolution.
*
* @deprecated this will be removed with PMD 7.0.0
*/
// TODO deprecate? This is only used in a test. I don't think it's really
// useful and it gives work to ClassTypeResolver.
@Deprecated
public Package getPackage() {
return this.pkg;
}