https://issues.apache.org/bugzilla/show_bug.cgi?id=51035

--- Comment #4 from Stefan Bodewig <[email protected]> 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
SecurityException
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: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to