/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6403465
* @summary javac should defer diagnostics until it can be determined they are persistent
*/
public class TestSuppression {
}
// missing class C
"class X { C c; }",
"class X { C foo() { return null; } }",
"class X { void foo(C c) { } }",
"class X extends C { }",
"class X<T extends C> { }",
// missing interface I
"class X implements I { }",
"interface X extends I { }",
// missing exception E
"class X { void m() throws E { } }",
// missing method m
"class X extends C { int i = m(); }",
// missing field f
"class X extends C { int i = f; }"
};
for (int g = 1; g <= 3; g++) {
try {
} catch (Throwable t) {
error("caught: " + t);
}
}
}
}
if (errors > 0)
}
count++;
// args.add("-XprintProcessorInfo");
}
}
}
}
return dir;
}
try {
} finally {
}
return f;
}
for (T v: values)
}
errors++;
}
int count;
int errors;
int total;
+ diagnostic);
}
return d.isFlagSet(RESOLVE_ERROR);
}
if (diagnostic instanceof JCDiagnostic)
return (JCDiagnostic) diagnostic;
throw new IllegalArgumentException();
}
}
@SupportedAnnotationTypes("*")
@SupportedOptions("gen")
Filer f;
Messager m;
int gen;
f = processingEnv.getFiler();
m = processingEnv.getMessager();
}
round++;
}
return true;
}
return SourceVersion.latest();
}
try {
} catch (IOException e) {
}
}
}
}