langtools/test/tools/javac/7153958/CPoolRefClassContainingInlinedCts.java
author alundblad
Wed, 26 Aug 2015 09:02:02 +0200
changeset 32337 c9d3ab9f601c
parent 31000 18bc6fadeb4e
permissions -rw-r--r--
8133671: langtools tests have bad license Summary: Dropped classpath exception from copyright notice in tests. Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14721
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
     1
/*
30730
d3ce7619db2c 8076543: Add @modules as needed to the langtools tests
akulyakh
parents: 14948
diff changeset
     2
 * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
14721
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
     4
 *
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
32337
c9d3ab9f601c 8133671: langtools tests have bad license
alundblad
parents: 31000
diff changeset
     7
 * published by the Free Software Foundation.
14721
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
     8
 *
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    13
 * accompanied this code).
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    14
 *
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    18
 *
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    21
 * questions.
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    22
 */
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    23
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    24
/*
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    25
 * @test
31000
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    26
 * @bug 7153958 8073372
14721
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    27
 * @summary add constant pool reference to class containing inlined constants
30846
2b3f379840f0 8074432: Move jdeps and javap to jdk.jdeps module
mchung
parents: 30730
diff changeset
    28
 * @modules jdk.jdeps/com.sun.tools.classfile
31000
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    29
 * @compile pkg/ClassToBeStaticallyImportedA.java pkg/ClassToBeStaticallyImportedB.java CPoolRefClassContainingInlinedCts.java
14721
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    30
 * @run main CPoolRefClassContainingInlinedCts
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    31
 */
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    32
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    33
import com.sun.tools.classfile.ClassFile;
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    34
import com.sun.tools.classfile.ConstantPool.CONSTANT_Class_info;
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    35
import com.sun.tools.classfile.ConstantPool.CPInfo;
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    36
import com.sun.tools.classfile.ConstantPoolException;
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    37
import java.io.File;
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    38
import java.io.IOException;
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    39
31000
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    40
import static pkg.ClassToBeStaticallyImportedA.staticFieldA;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    41
import static pkg.ClassToBeStaticallyImportedB.staticFieldB;
14721
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    42
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    43
public class CPoolRefClassContainingInlinedCts {
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    44
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    45
    public static void main(String args[]) throws Exception {
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    46
        new CPoolRefClassContainingInlinedCts().run();
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    47
    }
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    48
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    49
    void run() throws Exception {
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    50
        checkReferences();
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    51
    }
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    52
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    53
    int numberOfReferencedClassesToBeChecked = 0;
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    54
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    55
    void checkClassName(String className) {
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    56
        switch (className) {
31000
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    57
            case "SimpleAssignClassA" : case "BinaryExpClassA":
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    58
            case "UnaryExpClassA" : case "CastClassA":
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    59
            case "ParensClassA" : case "CondClassA":
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    60
            case "IfClassA" : case "pkg/ClassToBeStaticallyImportedA":
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    61
            case "SimpleAssignClassB" : case "BinaryExpClassB":
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    62
            case "UnaryExpClassB" : case "CastClassB":
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    63
            case "ParensClassB" : case "CondClassB":
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    64
            case "IfClassB" : case "pkg/ClassToBeStaticallyImportedB":
14721
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    65
                numberOfReferencedClassesToBeChecked++;
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    66
        }
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    67
    }
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    68
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    69
    void checkReferences() throws IOException, ConstantPoolException {
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    70
        File testClasses = new File(System.getProperty("test.classes"));
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    71
        File file = new File(testClasses,
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    72
                CPoolRefClassContainingInlinedCts.class.getName() + ".class");
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    73
        ClassFile classFile = ClassFile.read(file);
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    74
        int i = 1;
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    75
        CPInfo cpInfo;
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    76
        while (i < classFile.constant_pool.size()) {
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    77
            cpInfo = classFile.constant_pool.get(i);
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    78
            if (cpInfo instanceof CONSTANT_Class_info) {
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    79
                checkClassName(((CONSTANT_Class_info)cpInfo).getName());
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    80
            }
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    81
            i += cpInfo.size();
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    82
        }
31000
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    83
        if (numberOfReferencedClassesToBeChecked != 16) {
14721
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    84
            throw new AssertionError("Class reference missing in the constant pool");
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    85
        }
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    86
    }
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    87
31000
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    88
    private int assignA = SimpleAssignClassA.x;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    89
    private int binaryA = BinaryExpClassA.x + 1;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    90
    private int unaryA = -UnaryExpClassA.x;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    91
    private int castA = (int)CastClassA.x;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    92
    private int parensA = (ParensClassA.x);
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    93
    private int condA = (CondClassA.x == 1) ? 1 : 2;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    94
    private static int ifConstantA;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    95
    private static int importStaticA;
14721
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    96
    static {
31000
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    97
        if (IfClassA.x == 1) {
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
    98
            ifConstantA = 1;
14721
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
    99
        } else {
31000
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   100
            ifConstantA = 2;
14721
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   101
        }
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   102
    }
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   103
    static {
31000
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   104
        if (staticFieldA == 1) {
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   105
            importStaticA = 1;
14721
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   106
        } else {
31000
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   107
            importStaticA = 2;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   108
        }
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   109
    }
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   110
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   111
    // now as final constants
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   112
    private static final int assignB = SimpleAssignClassB.x;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   113
    private static final int binaryB = BinaryExpClassB.x + 1;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   114
    private static final int unaryB = -UnaryExpClassB.x;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   115
    private static final int castB = (int)CastClassB.x;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   116
    private static final int parensB = (ParensClassB.x);
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   117
    private static final int condB = (CondClassB.x == 1) ? 1 : 2;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   118
    private static final int ifConstantB;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   119
    private static final int importStaticB;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   120
    static {
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   121
        if (IfClassB.x == 1) {
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   122
            ifConstantB = 1;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   123
        } else {
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   124
            ifConstantB = 2;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   125
        }
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   126
    }
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   127
    static {
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   128
        if (staticFieldB == 1) {
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   129
            importStaticB = 1;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   130
        } else {
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   131
            importStaticB = 2;
14721
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   132
        }
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   133
    }
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   134
}
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   135
31000
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   136
class SimpleAssignClassA {
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   137
    public static final int x = 1;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   138
}
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   139
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   140
class SimpleAssignClassB {
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   141
    public static final int x = 1;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   142
}
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   143
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   144
class BinaryExpClassA {
14721
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   145
    public static final int x = 1;
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   146
}
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   147
31000
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   148
class BinaryExpClassB {
14721
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   149
    public static final int x = 1;
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   150
}
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   151
31000
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   152
class UnaryExpClassA {
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   153
    public static final int x = 1;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   154
}
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   155
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   156
class UnaryExpClassB {
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   157
    public static final int x = 1;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   158
}
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   159
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   160
class CastClassA {
14721
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   161
    public static final int x = 1;
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   162
}
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   163
31000
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   164
class CastClassB {
14721
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   165
    public static final int x = 1;
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   166
}
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   167
31000
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   168
class ParensClassA {
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   169
    public static final int x = 1;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   170
}
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   171
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   172
class ParensClassB {
14721
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   173
    public static final int x = 1;
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   174
}
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   175
31000
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   176
class CondClassA {
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   177
    public static final int x = 1;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   178
}
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   179
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   180
class CondClassB {
14721
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   181
    public static final int x = 1;
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   182
}
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   183
31000
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   184
class IfClassA {
14721
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   185
    public static final int x = 1;
071e3587f212 7153958: add constant pool reference to class containing inlined constants
vromero
parents:
diff changeset
   186
}
31000
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   187
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   188
class IfClassB {
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   189
    public static final int x = 1;
18bc6fadeb4e 8073372: Redundant CONSTANT_Class entry not generated for inlined constant
vromero
parents: 30846
diff changeset
   190
}