I know that the obvious answer is "pay attention" but because I am constantly switching between Java and Javascript, I'm endlessly forgetting that == doesn't work for string comparison on the Java side of things. Is there any way to get Eclipse to warn me that I'm probably not doing what I want to be doing when it sees me comparing two strings with ==
rather than using the equals() method?
There are many static code analyzer available which does such type of things. Few of them are:
They have many in-built rules and you can configure them in eclipse also. So as and when, you type and save, these tools would also show warnings just like in-built eclipse warnings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With