Java findbugs: suspicious comparison of long references
•
Java
Findbugs identified the following error in my code: @ h_ 404_ 7@
if (materialDeFinition.getId() == deFinitionToRemoveFromClass.getId()) { //... }
Solution
final Long id1 = materialDeFinition.getId(); final Long id2 = deFinitionToRemoveFromClass.getId(); if (id1.equals(id2)) { //... }
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码