IDEA-211443: Deprecation inspection must report links to deprecated elements in Javadoc.

GitOrigin-RevId: 512187024d767acaef4db482e7fa5ee85a068036
This commit is contained in:
Sergey Patrikeev
2019-04-28 16:47:44 +03:00
committed by intellij-monorepo-bot
parent e12a1970e4
commit 604b4b2ba8
9 changed files with 83 additions and 6 deletions
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>Test.java</file>
<line>5</line>
<description>'DeprecatedClass' is deprecated</description>
</problem>
<problem>
<file>Test.java</file>
<line>6</line>
<description>'DEPRECATED_CONSTANT' is deprecated</description>
</problem>
<problem>
<file>Test.java</file>
<line>7</line>
<description>'deprecatedField' is deprecated</description>
</problem>
<problem>
<file>Test.java</file>
<line>8</line>
<description>'deprecatedMethod' is deprecated</description>
</problem>
</problems>
@@ -0,0 +1,12 @@
import deprecated.DeprecatedClass;
import deprecated.DeprecatedOwner;
/**
* {@link DeprecatedClass}
* {@link DeprecatedOwner#DEPRECATED_CONSTANT}
* {@link DeprecatedOwner#deprecatedField}
* {@link DeprecatedOwner#deprecatedMethod(String)}
* {@link DeprecatedOwner#deprecatedMethod(int)} is not deprecated
*/
class Test {
}
@@ -0,0 +1,5 @@
package deprecated;
@Deprecated
public class DeprecatedClass {
}
@@ -0,0 +1,17 @@
package deprecated;
public class DeprecatedOwner {
@Deprecated
public static final int DEPRECATED_CONSTANT = 42;
@Deprecated
public String deprecatedField;
//This method is not deprecated, but its overloading is.
public void deprecatedMethod(int x) {
}
@Deprecated
public void deprecatedMethod(String s) {
}
}