pierstocazzo / jmonkeyengine

Automatically exported from code.google.com/p/jmonkeyengine
0 stars 0 forks source link

inconsistence in MultiFormatResourceLocator and SimpleResourceLocator equals() method #86

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
the equals() method of these to classes are not symmetrical.
example:
SimpleResourceLocator simple = new SimpleResourceLocator("/some/where")
SimpleResourceLocator multi = new MultiFormatResourceLocator("/some/
where", ".doc")

multi.equals(simple) == false
simple.equals(multi) == true //!!

This inconsistency may cause bugs and should be avoided.
On solution would be to check the type in SimpleResourceLocator instead of 
using instanceof. See the patch if have included.

Version: SVN Trunk of 2009/08/22

Original issue reported on code.google.com by Flori...@gmx.net on 22 Aug 2009 at 10:08

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by ShadowIs...@gmail.com on 1 Nov 2010 at 1:27

GoogleCodeExporter commented 9 years ago
closing old, applied, invalid and wrongly posted issues, all people searching 
for help please use the forum at jmonkeyengine.org

Original comment by normen667 on 7 Jun 2011 at 11:44