/[packages]/cauldron/java-1.8.0-openjdk/current/SOURCES/javadoc-error-jdk-8029145.patch
ViewVC logotype

Contents of /cauldron/java-1.8.0-openjdk/current/SOURCES/javadoc-error-jdk-8029145.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 659708 - (show annotations) (download)
Mon Aug 4 21:58:20 2014 UTC (9 years, 7 months ago) by luigiwalser
File size: 3534 byte(s)
- resync with fedora for the latest security fixes
- build with java 8

1 # HG changeset patch
2 # User ksrini
3 # Date 1392427687 28800
4 # Node ID 4c09a8dd09b37f17f186e575978e0dc5de6c84d3
5 # Parent 37cf13ea5cf99b04638660d6c91038f2ce210885
6 8029145: javadoc fails with java.lang.IllegalStateException: endPosTable already set
7 Reviewed-by: jjg
8
9 diff -r 37cf13ea5cf9 -r 4c09a8dd09b3 src/share/classes/com/sun/tools/javadoc/JavadocTool.java
10 --- jdk8/langtools/src/share/classes/com/sun/tools/javadoc/JavadocTool.java Thu Feb 13 14:58:10 2014 +0100
11 +++ jdk8/langtools/src/share/classes/com/sun/tools/javadoc/JavadocTool.java Fri Feb 14 17:28:07 2014 -0800
12 @@ -1,5 +1,5 @@
13 /*
14 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
15 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
16 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
17 *
18 * This code is free software; you can redistribute it and/or modify it
19 @@ -30,6 +30,7 @@
20 import java.util.Collection;
21 import java.util.EnumSet;
22 import java.util.HashMap;
23 +import java.util.HashSet;
24 import java.util.Map;
25 import java.util.Set;
26 import javax.tools.JavaFileManager.Location;
27 @@ -238,10 +239,13 @@
28 files = lb.toList();
29 }
30
31 + Set<JavaFileObject> ufiles = new HashSet<>();
32 for (JavaFileObject fo : files) {
33 - // messager.notice("main.Loading_source_file", fn);
34 - trees.append(parse(fo));
35 - hasFiles = true;
36 + if (ufiles.add(fo)) { // ignore duplicates
37 + // messager.notice("main.Loading_source_file", fn);
38 + trees.append(parse(fo));
39 + hasFiles = true;
40 + }
41 }
42
43 if (!hasFiles) {
44 diff -r 37cf13ea5cf9 -r 4c09a8dd09b3 test/tools/javadoc/parser/7091528/T7091528.java
45 --- jdk8/langtools/test/tools/javadoc/parser/7091528/T7091528.java Thu Feb 13 14:58:10 2014 +0100
46 +++ jdk8/langtools/test/tools/javadoc/parser/7091528/T7091528.java Fri Feb 14 17:28:07 2014 -0800
47 @@ -1,5 +1,5 @@
48 /*
49 - * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
50 + * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
51 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
52 *
53 * This code is free software; you can redistribute it and/or modify it
54 @@ -23,8 +23,8 @@
55
56 /**
57 * @test
58 - * @bug 7091528
59 - * @summary javadoc attempts to parse .class files
60 + * @bug 7091528 8029145
61 + * @summary ensures javadoc parses unique source files and ignores all class files
62 * @compile p/C1.java p/q/C2.java
63 * @run main T7091528
64 */
65 @@ -37,17 +37,22 @@
66 public static void main(String... args) {
67 new T7091528().run();
68 }
69 -
70 void run() {
71 File testSrc = new File(System.getProperty("test.src"));
72 File testClasses = new File(System.getProperty("test.classes"));
73 - String[] args = {
74 - "-d", ".",
75 + // 7091528, tests if class files are being ignored
76 + runTest("-d", ".",
77 "-sourcepath", testClasses + File.pathSeparator + testSrc,
78 "-subpackages",
79 - "p"
80 - };
81 + "p");
82 + // 8029145, tests if unique source files are parsed
83 + runTest("-d", ".",
84 + "-sourcepath", testSrc.getAbsolutePath(),
85 + "-subpackages",
86 + "p:p.q");
87
88 + }
89 + void runTest(String... args) {
90 StringWriter sw = new StringWriter();
91 PrintWriter pw = new PrintWriter(sw);
92 String doclet = com.sun.tools.doclets.standard.Standard.class.getName();
93

  ViewVC Help
Powered by ViewVC 1.1.30