mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
8037484: [javadoc] fails with java.lang.IllegalStateException: endPosTable already set
Reviewed-by: jjg
This commit is contained in:
parent
7a4a5803fc
commit
7a7a57bb88
3 changed files with 58 additions and 21 deletions
|
@ -23,7 +23,7 @@
|
|||
|
||||
/**
|
||||
* @test
|
||||
* @bug 7091528 8029145
|
||||
* @bug 7091528 8029145 8037484
|
||||
* @summary ensures javadoc parses unique source files and ignores all class files
|
||||
* @compile p/C1.java p/q/C2.java
|
||||
* @run main T7091528
|
||||
|
@ -50,6 +50,16 @@ public class T7091528 {
|
|||
"-sourcepath", testSrc.getAbsolutePath(),
|
||||
"-subpackages",
|
||||
"p:p.q");
|
||||
File testPkgDir = new File(testSrc, "p");
|
||||
File testFile = new File(testPkgDir, "C3.java");
|
||||
runTest("-d", ".",
|
||||
"-sourcepath", testSrc.getAbsolutePath(),
|
||||
testFile.getAbsolutePath(),
|
||||
"p");
|
||||
runTest("-d", ".",
|
||||
"-classpath", testSrc.getAbsolutePath(),
|
||||
testFile.getAbsolutePath(),
|
||||
"p");
|
||||
|
||||
}
|
||||
void runTest(String... args) {
|
||||
|
@ -65,7 +75,7 @@ public class T7091528 {
|
|||
}
|
||||
|
||||
if (rc != 0)
|
||||
System.err.println("javadoc failed: exit code = " + rc);
|
||||
throw new Error("javadoc failed: exit code = " + rc);
|
||||
|
||||
if (out.matches("(?s).*p/[^ ]+\\.class.*"))
|
||||
throw new Error("reading .class files");
|
||||
|
|
27
langtools/test/tools/javadoc/parser/7091528/p/C3.java
Normal file
27
langtools/test/tools/javadoc/parser/7091528/p/C3.java
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Copyright (c) 2014, 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.
|
||||
*/
|
||||
|
||||
|
||||
/** This is class C3, and no package for me please */
|
||||
public class C3 {}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue