Mercurial > hg > openjdk > jdk6 > langtools
changeset 5:f3819091510f jdk6-b02
6755901: Changes for openjdk6 build 02
6500207: REGRESSION: Compiler Crash with java.lang.AssertionError assertion
6527962: Retire the non-standard package com.sun.image.jpeg.codec
5070898: javah command doesn't throw correct exit code in case of error
6602407: lost main.errors resource
Summary: Final b02 state (as defined by the source bundle)
Reviewed-by: darcy
author | ohair |
---|---|
date | Fri, 30 Jan 2009 16:16:49 -0800 |
parents | e70c3950caa2 |
children | 60984077fb67 |
files | src/share/classes/com/sun/tools/javac/comp/Attr.java src/share/classes/com/sun/tools/javac/resources/legacy.properties src/share/classes/com/sun/tools/javadoc/resources/javadoc.properties src/share/classes/com/sun/tools/javah/Main.java test/tools/javac/generics/6500207/T6500207.java test/tools/javah/T5070898.java |
diffstat | 6 files changed, 61 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/comp/Attr.java Fri Jan 30 16:12:32 2009 -0800 +++ b/src/share/classes/com/sun/tools/javac/comp/Attr.java Fri Jan 30 16:16:49 2009 -0800 @@ -1290,7 +1290,10 @@ // Compute the result type. Type restype = mtype.getReturnType(); - assert restype.tag != WILDCARD : mtype; + + if (restype.tag == WILDCARD) { + restype = types.upperBound(restype); + } // as a special case, array.clone() has a result that is // the same as static type of the array being cloned
--- a/src/share/classes/com/sun/tools/javac/resources/legacy.properties Fri Jan 30 16:12:32 2009 -0800 +++ b/src/share/classes/com/sun/tools/javac/resources/legacy.properties Fri Jan 30 16:16:49 2009 -0800 @@ -93,6 +93,7 @@ com.sun.corba.se.spi.resolver = tiger legacy com.sun.corba.se.spi.servicecontext = tiger legacy com.sun.corba.se.spi.transport = tiger legacy +com.sun.image.codec.jpeg = tiger legacy com.sun.imageio.metadata = tiger legacy com.sun.imageio.plugins.bmp = tiger legacy com.sun.imageio.plugins.common = tiger legacy
--- a/src/share/classes/com/sun/tools/javadoc/resources/javadoc.properties Fri Jan 30 16:12:32 2009 -0800 +++ b/src/share/classes/com/sun/tools/javadoc/resources/javadoc.properties Fri Jan 30 16:16:49 2009 -0800 @@ -23,6 +23,7 @@ # have any questions. # +main.errors={0} errors main.error={0} error main.warnings={0} warnings main.warning={0} warning
--- a/src/share/classes/com/sun/tools/javah/Main.java Fri Jan 30 16:12:32 2009 -0800 +++ b/src/share/classes/com/sun/tools/javah/Main.java Fri Jan 30 16:16:49 2009 -0800 @@ -150,6 +150,7 @@ i++; javadocargs[i] = "-Xclasses"; - com.sun.tools.javadoc.Main.execute("javadoc", "com.sun.tools.javah.MainDoclet", javadocargs); + int rc = com.sun.tools.javadoc.Main.execute("javadoc", "com.sun.tools.javah.MainDoclet", javadocargs); + System.exit(rc); } }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/generics/6500207/T6500207.java Fri Jan 30 16:16:49 2009 -0800 @@ -0,0 +1,49 @@ +/* + * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @bug 6500207 + * @summary REGRESSION: Compiler Crash with java.lang.AssertionError assertion + * @author Lubo Litchev + * @compile T6500207.java + * @run main T6500207 + */ + +interface MyEnum<T, E extends Enum<E> & MyEnum<T, E> > { + T getValueForNull(); +} + +public class T6500207 { + + public static <E extends Enum<E> & MyEnum<?, E>> void test(Class<E> etype) { + + E[] all = etype.getEnumConstants(); + + Object codeForNull = all[0].getValueForNull(); + } + + public static void main(String [] args) { + new T6500207(); + } +}
--- a/test/tools/javah/T5070898.java Fri Jan 30 16:12:32 2009 -0800 +++ b/test/tools/javah/T5070898.java Fri Jan 30 16:16:49 2009 -0800 @@ -47,12 +47,12 @@ } void writeFile() throws Exception { - String content = + String content = "package test;\n" + "public class JavahTest{\n" + - " public static void main(String args){\n" + - " System.out.println(\"Test Message\");" + - " }\n" + + " public static void main(String args){\n" + + " System.out.println(\"Test Message\");" + + " }\n" + " private static native Object nativeTest();\n" + "}\n"; FileWriter out = new FileWriter("JavahTest.java");