ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 51035] hasmethod NullPointerException @ isMethodFound(
Date Tue, 12 Apr 2011 04:00:06 GMT

--- Comment #4 from Stefan Bodewig <> 2011-04-12 00:00:01 EDT ---
It looks as if the loadClass method in HasMethod started live as a copy
of Available's.

ignoreSystemClasses was introduced to available with bug 6031 and it also
introduced the special handling for SecurityException.  AFAIU a
is raised if you try to load a java.* class from a different classloader than
the bootstrap classloader.

In available's case the use-case is that you may want to check whether a jar
that you are going to use as bootclasspath in a new forked VM or pass to
a compiler.  The behavior "yes, the class is there even if this VM is not
allowed to load it" is reasonable in this case.

In HasMethod's case I lean towards throwing a BuildException that states
we were not allowed to load the class rather than returning false by now.

Ignoring the ignoreSystemClasses setting would in fact test the current
bootstrap classloader rather than the classpath you have specified so I
don't think it would be useful.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message