您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

False_InvalidAbsoluteTypeName.java 597B

123456789101112131415161718192021222324
  1. /** @testcase PR#65925 Valid but inaccessible type names should not be flagged by XLint:invalidAbsoluteTypeName */
  2. public class False_InvalidAbsoluteTypeName {
  3. public static void main(String[] args) {
  4. C.go();
  5. }
  6. }
  7. class C {
  8. static void go() {
  9. Nested.method();
  10. }
  11. // remove "private" to work around bug
  12. private static class Nested {
  13. static void method() {} // CW 17 per declare
  14. }
  15. }
  16. aspect A {
  17. // bug: trigger XLint:invalidAbsoluteTypeName b/c not visible, though valid
  18. declare warning : execution(void C.Nested.method()) : "nested method";
  19. }