8N/A/*
553N/A * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
8N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8N/A *
8N/A * This code is free software; you can redistribute it and/or modify it
8N/A * under the terms of the GNU General Public License version 2 only, as
8N/A * published by the Free Software Foundation.
8N/A *
8N/A * This code is distributed in the hope that it will be useful, but WITHOUT
8N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
8N/A * version 2 for more details (a copy is included in the LICENSE file that
8N/A * accompanied this code).
8N/A *
8N/A * You should have received a copy of the GNU General Public License version
8N/A * 2 along with this work; if not, write to the Free Software Foundation,
8N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
8N/A *
553N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
553N/A * or visit www.oracle.com if you need additional information or have any
553N/A * questions.
8N/A */
8N/A
8N/A/*
8N/A * @test
8N/A * @bug 4741726
8N/A * @summary allow Object += String
8N/A */
8N/A
8N/Apublic class StringConversion2
8N/A{
8N/A public static void main(String[] args) {
8N/A Object o = "Hello ";
8N/A String s = "World!";
8N/A o += s;
8N/A if (!o.equals("Hello World!"))
8N/A throw new Error("test failed");
8N/A }
8N/A}