--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java Mon May 02 08:54:14 2016 -0700
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java Mon May 02 15:01:54 2016 -0700
@@ -331,27 +331,6 @@
}
/**
- * Ensures that the module of the given class is readable to this
- * module.
- * @param targetClass class in module to be made readable
- */
- private void ensureReadable(Class<?> targetClass) {
- try {
- Method getModuleMethod = Class.class.getMethod("getModule");
- Object thisModule = getModuleMethod.invoke(this.getClass());
- Object targetModule = getModuleMethod.invoke(targetClass);
-
- Class<?> moduleClass = getModuleMethod.getReturnType();
- Method addReadsMethod = moduleClass.getMethod("addReads", moduleClass);
- addReadsMethod.invoke(thisModule, targetModule);
- } catch (NoSuchMethodException e) {
- // ignore
- } catch (Exception e) {
- throw new InternalError(e);
- }
- }
-
- /**
* Main program - internal
*/
private boolean parseAndExecute(List<String> argList,
@@ -550,7 +529,6 @@
}
try {
Class<?> klass = cl.loadClass(userDocletName);
- ensureReadable(klass);
return klass;
} catch (ClassNotFoundException cnfe) {
error("main.doclet_class_not_found", userDocletName);
@@ -601,7 +579,6 @@
for (String tagletName : tagletNames) {
try {
Class<?> klass = cl.loadClass(tagletName);
- ensureReadable(klass);
if (com.sun.tools.doclets.Taglet.class.isAssignableFrom(klass)) {
return true;
}