jjg@60: /* ohair@554: * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved. jjg@60: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. jjg@60: * jjg@60: * This code is free software; you can redistribute it and/or modify it jjg@60: * under the terms of the GNU General Public License version 2 only, as jjg@60: * published by the Free Software Foundation. jjg@60: * jjg@60: * This code is distributed in the hope that it will be useful, but WITHOUT jjg@60: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or jjg@60: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License jjg@60: * version 2 for more details (a copy is included in the LICENSE file that jjg@60: * accompanied this code). jjg@60: * jjg@60: * You should have received a copy of the GNU General Public License version jjg@60: * 2 along with this work; if not, write to the Free Software Foundation, jjg@60: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. jjg@60: * 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@60: */ jjg@60: jjg@60: /* jjg@60: * @test jjg@60: * @bug 6507179 jjg@60: * @summary Ensure that "-source" option isn't ignored. jjg@60: * @author Scott Seligman jjg@60: */ jjg@60: jjg@60: import com.sun.javadoc.*; jjg@60: jjg@60: public class SourceOption extends Doclet { jjg@60: jjg@60: public static void main(String[] args) { jjg@60: if (com.sun.tools.javadoc.Main.execute( jjg@60: "javadoc", jjg@60: "SourceOption", jjg@140: SourceOption.class.getClassLoader(), jjg@60: new String[] {"-source", "1.3", "p"}) != 0) jjg@60: throw new Error("Javadoc encountered warnings or errors."); jjg@60: } jjg@60: jjg@60: public static boolean start(RootDoc root) { jjg@60: root.classes(); // force parser into action jjg@60: return true; jjg@60: } jjg@60: }