test/tools/javac/6717241/T6717241b.java

Thu, 24 Jul 2008 19:06:57 +0100

author
mcimadamore
date
Thu, 24 Jul 2008 19:06:57 +0100
changeset 80
5c9cdeb740f2
child 384
ed31953ca025
permissions
-rw-r--r--

6717241: some diagnostic argument is prematurely converted into a String object
Summary: removed early toString() conversions applied to diagnostic arguments
Reviewed-by: jjg

mcimadamore@80 1 /*
mcimadamore@80 2 * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
mcimadamore@80 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
mcimadamore@80 4 *
mcimadamore@80 5 * This code is free software; you can redistribute it and/or modify it
mcimadamore@80 6 * under the terms of the GNU General Public License version 2 only, as
mcimadamore@80 7 * published by the Free Software Foundation.
mcimadamore@80 8 *
mcimadamore@80 9 * This code is distributed in the hope that it will be useful, but WITHOUT
mcimadamore@80 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
mcimadamore@80 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
mcimadamore@80 12 * version 2 for more details (a copy is included in the LICENSE file that
mcimadamore@80 13 * accompanied this code).
mcimadamore@80 14 *
mcimadamore@80 15 * You should have received a copy of the GNU General Public License version
mcimadamore@80 16 * 2 along with this work; if not, write to the Free Software Foundation,
mcimadamore@80 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
mcimadamore@80 18 *
mcimadamore@80 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
mcimadamore@80 20 * CA 95054 USA or visit www.sun.com if you need additional information or
mcimadamore@80 21 * have any questions.
mcimadamore@80 22 */
mcimadamore@80 23
mcimadamore@80 24 /**
mcimadamore@80 25 * @test
mcimadamore@80 26 * @bug 6717241
mcimadamore@80 27 * @summary some diagnostic argument is prematurely converted into a String object
mcimadamore@80 28 * @author Maurizio Cimadamore
mcimadamore@80 29 * @compile/fail/ref=T6717241b.out -XDstdout -XDrawDiagnostics T6717241b.java
mcimadamore@80 30 */
mcimadamore@80 31
mcimadamore@80 32 class T6717241b {
mcimadamore@80 33 void test() {
mcimadamore@80 34 //this will generate a 'cant.resolve.location'
mcimadamore@80 35 Object o = v;
mcimadamore@80 36 //this will generate a 'cant.resolve.location.args'
mcimadamore@80 37 m1(1, "");
mcimadamore@80 38 //this will generate a 'cant.resolve.location.args.params'
mcimadamore@80 39 T6717241b.<Integer,Double>m2(1, "");
mcimadamore@80 40 }
mcimadamore@80 41 }

mercurial