8034258: Don't use binary testing class files
Reviewed-by: jjg, ksrini
This commit is contained in:
parent
38f5cea050
commit
acc6539ad3
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,11 +23,11 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 4548768
|
||||
* @bug 4548768 8034258
|
||||
* @summary Javadoc in JDK 1.4 uses classpath and not just source dir
|
||||
* @author gafter
|
||||
* @modules jdk.javadoc
|
||||
* @compile p/SourceOnly.java
|
||||
* @compile p/SourceOnly.java p/NonSource.jasm
|
||||
* @run main p.SourceOnly
|
||||
*/
|
||||
|
||||
|
Binary file not shown.
36
test/langtools/tools/javadoc/sourceOnly/p/NonSource.jasm
Normal file
36
test/langtools/tools/javadoc/sourceOnly/p/NonSource.jasm
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package p;
|
||||
|
||||
super public class NonSource
|
||||
version 46:0
|
||||
{
|
||||
public Method "<init>":"()V"
|
||||
stack 1 locals 1
|
||||
{
|
||||
aload_0;
|
||||
invokespecial Method java/lang/Object."<init>":"()V";
|
||||
return;
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,8 +26,9 @@ package p;
|
||||
/** Test that when running javadoc on a package, we only get
|
||||
* documentation for those classes for which source was provided.
|
||||
*/
|
||||
public class SourceOnly extends com.sun.javadoc.Doclet
|
||||
{
|
||||
public class SourceOnly extends com.sun.javadoc.Doclet {
|
||||
NonSource dependency; // force a compilation error if not on classpath.
|
||||
|
||||
public static void main(String[] args) {
|
||||
// run javadoc on package p
|
||||
int result = com.sun.tools.javadoc.Main.
|
||||
|
Loading…
Reference in New Issue
Block a user