Deprecation inspection: update test data.

1) The default constructor is a one not declared in source code. Otherwise this is 'C()'.
2) Make Test class top-level to test ignoreInSameOutermostClass flag properly.
This commit is contained in:
Sergey Patrikeev
2018-12-02 17:58:04 +03:00
parent 307738f6f3
commit 3b7c8e2b06
3 changed files with 12 additions and 12 deletions
@@ -8,7 +8,7 @@
<problem>
<file>Test.java</file>
<line>10</line>
<description>Default constructor in C is deprecated</description>
<description>'C' is deprecated</description>
</problem>
</problems>
@@ -7,17 +7,17 @@ class Test {
)
void method() {
}
}
@interface A {
int allowed() default 0;
@interface A {
int allowed() default 0;
@Deprecated
int byAnnotation() default 0;
@Deprecated
int byAnnotation() default 0;
/**@deprecated*/
int byDocTag() default 0;
/**@deprecated*/
int byDocTag() default 0;
@Deprecated(forRemoval = true)
int forRemoval() default 0;
}
@Deprecated(forRemoval = true)
int forRemoval() default 0;
}
@@ -7,12 +7,12 @@ class <error descr="Default constructor in 'C' is deprecated and marked for remo
class P {
void normal() {
new <error descr="Default constructor in 'C' is deprecated and marked for removal">C</error>(){};
new <error descr="'C()' is deprecated and marked for removal">C</error>(){};
}
@SuppressWarnings("deprecation")
void suppressDeprecation() {
new <error descr="Default constructor in 'C' is deprecated and marked for removal">C</error>(){};
new <error descr="'C()' is deprecated and marked for removal">C</error>(){};
}
@SuppressWarnings("removal")