Remove docgen corner case on undocumented data structures, as these are no longer relevant.
Verified by building documentation for Bazel at HEAD.
RELNOTES: None.
@@ -33,7 +33,6 @@ import java.util.ArrayDeque;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
@@ -138,12 +137,7 @@ final class SkylarkDocumentationCollector {
SkylarkModule skylarkModule = moduleClass.equals(Object.class)
? getTopLevelModule()
: Runtime.getSkylarkNamespace(moduleClass).getAnnotation(SkylarkModule.class);
- if (skylarkModule == null) {
- // TODO(bazel-team): we currently have undocumented methods on undocumented data
- // structures, namely java.util.List. Remove this case when we are done.
- Preconditions.checkState(!skylarkSignature.documented());
- Preconditions.checkState(moduleClass == List.class);
- } else {
+ Preconditions.checkNotNull(skylarkModule);
if (!modules.containsKey(skylarkModule.name())) {
modules.put(skylarkModule.name(), new SkylarkModuleDoc(skylarkModule, moduleClass));
}
@@ -152,7 +146,6 @@ final class SkylarkDocumentationCollector {
}
}
}
- }
private static void collectBuiltinModule(
Map<SkylarkModule, Class<?>> modules, Class<?> moduleClass) {
