jjg@52: /* ohair@554: * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. jjg@52: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. jjg@52: * jjg@52: * This code is free software; you can redistribute it and/or modify it jjg@52: * under the terms of the GNU General Public License version 2 only, as jjg@52: * published by the Free Software Foundation. jjg@52: * jjg@52: * This code is distributed in the hope that it will be useful, but WITHOUT jjg@52: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or jjg@52: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License jjg@52: * version 2 for more details (a copy is included in the LICENSE file that jjg@52: * accompanied this code). jjg@52: * jjg@52: * You should have received a copy of the GNU General Public License version jjg@52: * 2 along with this work; if not, write to the Free Software Foundation, jjg@52: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. jjg@52: * ohair@554: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@554: * or visit www.oracle.com if you need additional information or have any ohair@554: * questions. jjg@52: */ jjg@52: jjg@52: /* jjg@52: * @test jjg@52: * @bug 6715767 jjg@52: * @summary javap on java.lang.ClassLoader crashes jjg@52: */ jjg@52: jjg@52: import java.io.*; jjg@52: jjg@52: public class T6715767 { jjg@52: public static void main(String... args) throws Exception { jjg@52: new T6715767().run(); jjg@52: } jjg@52: jjg@52: void run() throws Exception { jjg@52: StringWriter sw = new StringWriter(); jjg@52: PrintWriter pw = new PrintWriter(sw); jjg@52: String[] args = { "java.lang.ClassLoader" }; jjg@52: int rc = com.sun.tools.javap.Main.run(args, pw); jjg@52: if (rc != 0 || jjg@52: sw.toString().indexOf("at com.sun.tools.javap.JavapTask.run") != -1) { jjg@52: System.err.println("rc: " + rc); jjg@52: System.err.println("log:\n" + sw); jjg@52: throw new Exception("unexpected result"); jjg@52: } jjg@52: } jjg@52: } jjg@52: