diff options
author | Ari Hausman-Cohen <arihc@google.com> | 2017-10-13 12:56:54 -0700 |
---|---|---|
committer | Aurimas Liutikas <aurimas@google.com> | 2018-07-16 12:29:25 -0700 |
commit | 36be1ef2d188b996f136b1b529ee9f7dee64c753 (patch) | |
tree | 88ede6836d786db701c1ef88d434ed97fba864e6 /src | |
parent | b04fabf012428eb20949ccf7fb4ab9c133d3727c (diff) | |
download | doclava-36be1ef2d188b996f136b1b529ee9f7dee64c753.tar.gz |
Correctly stub classes with hidden constructors
If a class had no publicly-visible constructors, and the
super constructor had a throws clause, no call to a super
constructor would be generated. If there was no default
super constructor, this would cause a build failure.
Fixed by just allowing the super call even though the throws
are not exposed.
Bug: 67777702
Test: Stubs that failed to build now build.
Change-Id: I7d1126daefee097091ec7c96d9b85694db7f2f8f
Merged-In: I7d1126daefee097091ec7c96d9b85694db7f2f8f
Diffstat (limited to 'src')
-rw-r--r-- | src/com/google/doclava/Stubs.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/google/doclava/Stubs.java b/src/com/google/doclava/Stubs.java index 28c6892..930d52c 100644 --- a/src/com/google/doclava/Stubs.java +++ b/src/com/google/doclava/Stubs.java @@ -1003,7 +1003,7 @@ public class Stubs { if (canCallMethod(cl, m)) { if (m.thrownExceptions() != null) { for (ClassInfo thrown : m.thrownExceptions()) { - if (!exceptionNames.contains(thrown.name())) { + if (thrownExceptions != null && !exceptionNames.contains(thrown.name())) { badException = true; } } |