JDK-8020325.js revision 427:798e3aa19718
12116Sjkh/*
22116Sjkh * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
32116Sjkh * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
42116Sjkh *
52116Sjkh * This code is free software; you can redistribute it and/or modify it
62116Sjkh * under the terms of the GNU General Public License version 2 only, as
72116Sjkh * published by the Free Software Foundation.
82116Sjkh *
92116Sjkh * This code is distributed in the hope that it will be useful, but WITHOUT
102116Sjkh * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
112116Sjkh * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
122116Sjkh * version 2 for more details (a copy is included in the LICENSE file that
132116Sjkh * accompanied this code).
142116Sjkh *
152116Sjkh * You should have received a copy of the GNU General Public License version
162116Sjkh * 2 along with this work; if not, write to the Free Software Foundation,
172116Sjkh * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
182116Sjkh *
192116Sjkh * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202116Sjkh * or visit www.oracle.com if you need additional information or have any
212116Sjkh * questions.
222116Sjkh */
232116Sjkh
242116Sjkh/**
252116Sjkh * JDK-8020325: static property does not work on accessible, public classes
262116Sjkh *
272116Sjkh * @test
282116Sjkh * @run
292116Sjkh */
302116Sjkh
312116Sjkhfunction printStatic(obj) {
322116Sjkh    print(obj.getClass().static);
332116Sjkh}
342116Sjkh
352116SjkhprintStatic(new java.util.ArrayList());
3623577SbdeprintStatic(new java.util.HashMap());
372116SjkhprintStatic(new java.lang.Object());
3850476SpeterprintStatic(new (Java.type("java.lang.Object[]"))(0));
392116Sjkh