Please review a simple fix to address an apparently long-standing issue of generating a redirection loop in the top-level `index.html` file.
The fix is simply to remove some obsolete/unnecessary code in `HtmlConfiguration.setTopFile` that silently and incorrectly short-circuited the functionality of that method. In addition to the fix, an `assert` statement is added in `IndexRedirectWriter` to ensure that invalid arguments are not provided. (An alternative would be explicit `if` statements than can throw NPE or ILA. The test case is when there are no classes or interfaces specified in the command-line arguments. ------------- Commit messages: - JDK-8322874: Redirection loop in index.html Changes: https://git.openjdk.org/jdk/pull/17270/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17270&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8322874 Stats: 83 lines in 3 files changed: 71 ins; 12 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/17270.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/17270/head:pull/17270 PR: https://git.openjdk.org/jdk/pull/17270