Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#39 TreeItem contains() will erroneously return true

closed
5
2012-08-28
2011-12-10
Anonymous
No

Found this in the 1.3.1 TreeItem source:
127 boolean found = item.contains(item);

http://nifty-gui.git.sourceforge.net/git/gitweb.cgi?p=nifty-gui/nifty;a=blob;f=nifty-controls/src/main/java/de/lessvoid/nifty/controls/TreeItem.java;h=9bea400790adf6446b26441bc22e2beed7467d65;hb=refs/heads/1.3.1

Pretty sure that will always return true.
Should probably be :
127 boolean found = item.contains(child);

Discussion

  • void256
    void256
    2011-12-10

    Mark, can you check this?

     
  • Mark Schrijver
    Mark Schrijver
    2011-12-10

    This bug has been confirmed and should now be fixed.
    Replaced the mentioned item for child. Now the contains method works as intended