< prev index next >

langtools/test/tools/javac/8000518/DuplicateConstantPoolEntry.java

Print this page




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8000518
  27  * @summary Javac generates duplicate name_and_type constant pool entry for
  28  * class BinaryOpValueExp.java
  29  * @modules jdk.compiler/com.sun.tools.classfile
  30  * @run main DuplicateConstantPoolEntry
  31  */
  32 
  33 import com.sun.source.util.JavacTask;
  34 import com.sun.tools.classfile.ClassFile;
  35 import com.sun.tools.classfile.ConstantPoolException;
  36 import java.io.File;
  37 import java.io.IOException;
  38 import java.net.URI;
  39 import java.util.Arrays;
  40 import java.util.List;
  41 import javax.tools.JavaCompiler;
  42 import javax.tools.JavaFileObject;
  43 import javax.tools.SimpleJavaFileObject;
  44 import javax.tools.ToolProvider;
  45 
  46 /*
  47  * This bug was reproduced having two classes B and C referenced from a class A
  48  * class C should be compiled and generated in advance. Later class A and B should
  49  * be compiled like this: javac A.java B.java




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8000518
  27  * @summary Javac generates duplicate name_and_type constant pool entry for
  28  * class BinaryOpValueExp.java
  29  * @modules jdk.jdeps/com.sun.tools.classfile
  30  * @run main DuplicateConstantPoolEntry
  31  */
  32 
  33 import com.sun.source.util.JavacTask;
  34 import com.sun.tools.classfile.ClassFile;
  35 import com.sun.tools.classfile.ConstantPoolException;
  36 import java.io.File;
  37 import java.io.IOException;
  38 import java.net.URI;
  39 import java.util.Arrays;
  40 import java.util.List;
  41 import javax.tools.JavaCompiler;
  42 import javax.tools.JavaFileObject;
  43 import javax.tools.SimpleJavaFileObject;
  44 import javax.tools.ToolProvider;
  45 
  46 /*
  47  * This bug was reproduced having two classes B and C referenced from a class A
  48  * class C should be compiled and generated in advance. Later class A and B should
  49  * be compiled like this: javac A.java B.java


< prev index next >