The test http://hg.openjdk.java.net/jdk9/dev/langtools/file/c949657b7390/test/jdk/javadoc/tool/8025693/Test.java
needs to be fixed correctly, ie. it checks only for the error message, which does not show because of the changes for JDK-8159305, where the case of the no package files cause an error vs. warning.
Therefore there are two parts to this:
a. fix the test and b. fix ElementsTable such that it discovers empty packages, empty meaning devoid of both class and source files, only then throw error