summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAri Hausman-Cohen <arihc@google.com>2017-10-13 12:56:54 -0700
committerAurimas Liutikas <aurimas@google.com>2018-07-16 12:29:25 -0700
commit36be1ef2d188b996f136b1b529ee9f7dee64c753 (patch)
tree88ede6836d786db701c1ef88d434ed97fba864e6 /src
parentb04fabf012428eb20949ccf7fb4ab9c133d3727c (diff)
downloaddoclava-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.java2
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;
}
}