changeset 2192:e5b9f24eecf6 icedtea-2.7.0pre07

Merge jdk7u111-b01
author andrew
date Wed, 07 Sep 2016 06:06:39 +0100
parents 27a9a0ecd700 (current diff) 548ba811d4c6 (diff)
children 5f91109e8834
files .hgtags
diffstat 4 files changed, 46 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Jul 29 04:24:23 2016 +0100
+++ b/.hgtags	Wed Sep 07 06:06:39 2016 +0100
@@ -647,3 +647,11 @@
 e15dd34800b580c84cc6587dcc1b62510a443afd icedtea-2.7.0pre04
 caa50dd46a142ddf99c5c08d76ce8242f943f471 icedtea-2.7.0pre05
 bd3480b6d64ab1f76ffb0a074aaf12d08b47f17f icedtea-2.7.0pre06
+2741575d96f3985d41de8ebe1ba7fae8afbb0fde jdk7u91-b00
+1a9e2dcc91dc3d0c103b09c478b3ac31ac45733f jdk7u91-b01
+08e99c45e470ce8b87875c1cbe78ac2f341555a3 jdk7u91-b02
+3c71abf7435352aee6e74ba2581274181ad3d17e jdk7u95-b00
+93a2788178e6ebebfbd30075f51ab35ac4f1b2a1 jdk7u99-b00
+5713b8d2db3f1fc0c9802fdaf30ca802cddf8f65 jdk7u101-b00
+e65eb66727550af75293996fc42e2c49c2002659 jdk7u111-b00
+a5002845bff276d1a8e4bdb4a0dcb972509f7d07 jdk7u111-b01
--- a/src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java	Fri Jul 29 04:24:23 2016 +0100
+++ b/src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java	Wed Sep 07 06:06:39 2016 +0100
@@ -120,12 +120,14 @@
      * Returns the flags of a ClassSymbol in terms of javac's flags
      */
     static long getFlags(ClassSymbol clazz) {
-        while (true) {
-            try {
-                return clazz.flags();
-            } catch (CompletionFailure ex) {
-                // quietly ignore completion failures
-            }
+        try {
+            return clazz.flags();
+        } catch (CompletionFailure ex) {
+            /* Quietly ignore completion failures and try again - the type
+             * for which the CompletionFailure was thrown shouldn't be completed
+             * again by the completer that threw the CompletionFailure.
+             */
+            return getFlags(clazz);
         }
     }
 
--- a/src/share/classes/com/sun/tools/javadoc/MethodDocImpl.java	Fri Jul 29 04:24:23 2016 +0100
+++ b/src/share/classes/com/sun/tools/javadoc/MethodDocImpl.java	Wed Sep 07 06:06:39 2016 +0100
@@ -128,7 +128,7 @@
              t.tag == TypeTags.CLASS;
              t = env.types.supertype(t)) {
             ClassSymbol c = (ClassSymbol)t.tsym;
-            for (Scope.Entry e = c.members().lookup(sym.name); e.scope != null; e = e.next()) {
+            for (Scope.Entry e = membersOf(c).lookup(sym.name); e.scope != null; e = e.next()) {
                 if (sym.overrides(e.sym, origin, env.types, true)) {
                     return TypeMaker.getType(env, t);
                 }
@@ -160,7 +160,7 @@
              t.tag == TypeTags.CLASS;
              t = env.types.supertype(t)) {
             ClassSymbol c = (ClassSymbol)t.tsym;
-            for (Scope.Entry e = c.members().lookup(sym.name); e.scope != null; e = e.next()) {
+            for (Scope.Entry e = membersOf(c).lookup(sym.name); e.scope != null; e = e.next()) {
                 if (sym.overrides(e.sym, origin, env.types, true)) {
                     return env.getMethodDoc((MethodSymbol)e.sym);
                 }
@@ -169,6 +169,19 @@
         return null;
     }
 
+    /**Retrieve members of c, ignoring any CompletionFailures that occur. */
+    private Scope membersOf(ClassSymbol c) {
+        try {
+            return c.members();
+        } catch (CompletionFailure cf) {
+            /* Quietly ignore completion failures and try again - the type
+             * for which the CompletionFailure was thrown shouldn't be completed
+             * again by the completer that threw the CompletionFailure.
+             */
+            return membersOf(c);
+        }
+    }
+
     /**
      * Tests whether this method overrides another.
      * The overridden method may be one declared in a superclass or
--- a/src/share/classes/com/sun/tools/javadoc/TypeMaker.java	Fri Jul 29 04:24:23 2016 +0100
+++ b/src/share/classes/com/sun/tools/javadoc/TypeMaker.java	Wed Sep 07 06:06:39 2016 +0100
@@ -29,6 +29,7 @@
 
 import com.sun.tools.javac.code.Symbol;
 import com.sun.tools.javac.code.Symbol.ClassSymbol;
+import com.sun.tools.javac.code.Symbol.CompletionFailure;
 import com.sun.tools.javac.code.Type;
 import com.sun.tools.javac.code.Type.ClassType;
 import com.sun.tools.javac.code.Type.TypeVar;
@@ -44,12 +45,25 @@
         return getType(env, t, true);
     }
 
+    public static com.sun.javadoc.Type getType(DocEnv env, Type t,
+            boolean errToClassDoc) {
+        try {
+            return getTypeImpl(env, t, errToClassDoc);
+        } catch (CompletionFailure cf) {
+            /* Quietly ignore completion failures and try again - the type
+             * for which the CompletionFailure was thrown shouldn't be completed
+             * again by the completer that threw the CompletionFailure.
+             */
+            return getType(env, t, errToClassDoc);
+        }
+    }
+
     /**
      * @param errToClassDoc  if true, ERROR type results in a ClassDoc;
      *          false preserves legacy behavior
      */
     @SuppressWarnings("fallthrough")
-    public static com.sun.javadoc.Type getType(DocEnv env, Type t,
+    private static com.sun.javadoc.Type getTypeImpl(DocEnv env, Type t,
                                                boolean errToClassDoc) {
         if (env.legacyDoclet) {
             t = env.types.erasure(t);