6125N/A/*
6125N/A * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
6125N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6125N/A *
6125N/A * This code is free software; you can redistribute it and/or modify it
6125N/A * under the terms of the GNU General Public License version 2 only, as
6125N/A * published by the Free Software Foundation.
6125N/A *
6125N/A * This code is distributed in the hope that it will be useful, but WITHOUT
6125N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6125N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
6125N/A * version 2 for more details (a copy is included in the LICENSE file that
6125N/A * accompanied this code).
6125N/A *
6125N/A * You should have received a copy of the GNU General Public License version
6125N/A * 2 along with this work; if not, write to the Free Software Foundation,
6125N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
6125N/A *
6125N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
6125N/A * or visit www.oracle.com if you need additional information or have any
6125N/A * questions.
6125N/A */
6125N/A
6125N/A/*
6125N/A * @test
6125N/A * @bug 7080156 7094245
6125N/A * @summary Tests beans with public arrays
6125N/A * @author Sergey Malenkov
6125N/A */
6125N/A
6125N/Apublic class Test7080156 extends AbstractTest {
6125N/A public static void main(String[] args) {
6125N/A new Test7080156().test(true);
6125N/A }
6125N/A
6125N/A protected Object getObject() {
6125N/A Bean bean = new Bean();
6125N/A bean.setArray("something");
6125N/A return bean;
6125N/A }
6125N/A
6125N/A @Override
6125N/A protected Object getAnotherObject() {
6125N/A Bean bean = new Bean();
6125N/A bean.setArray("some", "thing");
6125N/A return bean;
6125N/A }
6125N/A
6125N/A public static class Bean {
6125N/A public String[] array = {"default"};
6125N/A
6125N/A public void setArray(String... array) {
6125N/A this.array = array;
6125N/A }
6125N/A
6125N/A public String[] getArray() {
6125N/A return this.array;
6125N/A }
6125N/A }
6125N/A}