Mercurial > hg > release > icedtea7-forest-2.6 > langtools
changeset 2186:fd0a34cb97b4 icedtea-2.6.4
Merge jdk7u95-b00
author | andrew |
---|---|
date | Mon, 18 Jan 2016 15:52:45 +0000 |
parents | 7a1eb4ebd2f0 (current diff) 93a2788178e6 (diff) |
children | 4dbacb09de90 |
files | .hgtags |
diffstat | 4 files changed, 39 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Fri Nov 13 08:31:56 2015 +0000 +++ b/.hgtags Mon Jan 18 15:52:45 2016 +0000 @@ -649,3 +649,4 @@ 73356b81c5c773a29729ae3b641516e0ac4a015d icedtea-2.6.2 08e99c45e470ce8b87875c1cbe78ac2f341555a3 jdk7u91-b02 91fdb0c83e50c398bee5f0550600d20650f2a6ef icedtea-2.6.3 +3c71abf7435352aee6e74ba2581274181ad3d17e jdk7u95-b00
--- a/src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java Fri Nov 13 08:31:56 2015 +0000 +++ b/src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java Mon Jan 18 15:52:45 2016 +0000 @@ -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 Nov 13 08:31:56 2015 +0000 +++ b/src/share/classes/com/sun/tools/javadoc/MethodDocImpl.java Mon Jan 18 15:52:45 2016 +0000 @@ -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 Nov 13 08:31:56 2015 +0000 +++ b/src/share/classes/com/sun/tools/javadoc/TypeMaker.java Mon Jan 18 15:52:45 2016 +0000 @@ -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);