langtools/test/tools/javac/6520152/T6520152.java
author trims
Fri, 02 Jul 2010 01:37:36 -0700
changeset 5910 ca3d85421cbb
parent 10 06bc494ca11e
child 37633 d16d6d59446d
permissions -rw-r--r--
6966252: Bump the HS19 build number to 04 Summary: Update the HS19 build number to 04 Reviewed-by: jcoomes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
     2
 * @test
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * @bug     6520152
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 * @summary ACC_FINAL flag for anonymous classes shouldn't be set
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
 * @compile T.java
06bc494ca11e Initial load
duke
parents:
diff changeset
     6
 * @run main/othervm T6520152
06bc494ca11e Initial load
duke
parents:
diff changeset
     7
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
06bc494ca11e Initial load
duke
parents:
diff changeset
     9
import java.lang.reflect.Method;
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
import static java.lang.reflect.Modifier.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
public class T6520152 {
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
    public static void main(String [] args) throws Exception {
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
        Class clazz = Class.forName("T$1");
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
        if ((clazz.getModifiers() & FINAL) != 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
            throw new RuntimeException("Failed: " + clazz.getName() + " shouldn't be marked final.");
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    19
}