langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesInAnonymousClassTest.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 /* |
24 /* |
25 * @test |
25 * @test |
26 * @bug 8042251 |
26 * @bug 8042251 8062373 |
27 * @summary Testing InnerClasses_attribute of inner classes in anonymous class. |
27 * @summary Testing InnerClasses_attribute of inner classes in anonymous class. |
28 * @library /tools/lib /tools/javac/lib ../lib |
28 * @library /tools/lib /tools/javac/lib ../lib |
29 * @build InnerClassesTestBase TestResult TestBase InMemoryFileManager ToolBox |
29 * @build InnerClassesTestBase TestResult TestBase InMemoryFileManager ToolBox |
30 * @run main InnerClassesInAnonymousClassTest |
30 * @run main InnerClassesInAnonymousClassTest |
31 */ |
31 */ |
71 |
71 |
72 @Override |
72 @Override |
73 public void getAdditionalFlags(Map<String, Set<String>> class2Flags, ClassType type, Modifier... flags) { |
73 public void getAdditionalFlags(Map<String, Set<String>> class2Flags, ClassType type, Modifier... flags) { |
74 super.getAdditionalFlags(class2Flags, type, flags); |
74 super.getAdditionalFlags(class2Flags, type, flags); |
75 class2Flags.put("Anonymous", getFlags(currentClassType, Arrays.asList(flags))); |
75 class2Flags.put("Anonymous", getFlags(currentClassType, Arrays.asList(flags))); |
76 class2Flags.put("1", new HashSet<>()); |
76 class2Flags.put("1", new HashSet<>() {}); |
77 } |
77 } |
78 } |
78 } |