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

--- Comment #6 from Konstantin Kolinko <knst.koli...@gmail.com> ---
(In reply to Christopher Schultz from comment #5)
> 
> I haven't read through the code to see how class object references are
> maintained, but I have been bitten in the past when
> Foo.class.getMethod("bar").getName() == Foo.class.getMethod("bar").getName()
> yields false.
> 
> Perhaps clazz.equals(conflict) would be better than == in this case?

Mark's fix in r1633810 used conflict.equals(clazz), so it is OK.


The JVM specification (Java 8 edition) in chapter 5.3 Creation and Loading
and Java Language Specification (Java 8 edition) in chapter 12.2 Loading of
Classes and Interfaces both contain the same phrase:

"Given the same name, a good class loader should always return the same Class
object."

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to