RFTools

RFTools

74M Downloads

Equals check always returns false

josephcsible opened this issue ยท 1 comments

commented

https://github.com/McJty/RFTools/blob/b09676febf4f000cb2a94dc1ab3ec5313851ef61/src/main/java/mcjty/rftools/blocks/environmental/GuiEnvironmentalController.java#L55

https://github.com/McJty/RFTools/blob/b09676febf4f000cb2a94dc1ab3ec5313851ef61/src/main/java/mcjty/rftools/blocks/environmental/GuiEnvironmentalController.java#L222-L224

This will always return false, since the first thing AbstractList#equals checks is whether playersList implements List, which it doesn't. (And it doesn't even contain Strings; it contains Labels.) What is this supposed to be testing?

commented

It was supposed to be an optimization to avoid repopulating the list all the time. But since this is only in the gui and the list of players is small it doesn't matter. I just removed the test