langtools/test/tools/javac/6520152/T6520152.java
author hseigel
Wed, 02 Mar 2016 23:48:41 +0000
changeset 36397 c487ced7231c
parent 10 06bc494ca11e
child 37633 d16d6d59446d
permissions -rw-r--r--
Merge

/**
 * @test
 * @bug     6520152
 * @summary ACC_FINAL flag for anonymous classes shouldn't be set
 * @compile T.java
 * @run main/othervm T6520152
 */

import java.lang.reflect.Method;
import static java.lang.reflect.Modifier.*;

public class T6520152 {
    public static void main(String [] args) throws Exception {
        Class clazz = Class.forName("T$1");
        if ((clazz.getModifiers() & FINAL) != 0) {
            throw new RuntimeException("Failed: " + clazz.getName() + " shouldn't be marked final.");
        }
    }
}