Dear Vendor

Dear vendor,

When I have to fix a difficult defect found deep within your code, I occasionally open your classes in decafe. When I see you comparing two Strings with the equality operator (==) I am appalled.

Yours sincerely,

Koz

Posted on November 27th, 2003 | 2 comments | Commenting Closed
Koz

Koz November 27th, 2003 @ 06:29 PM

Yeah Right! :)

Bryn

Bryn November 27th, 2003 @ 11:41 PM

In some controlled circumstances it is valid to use the equality (==) operator for comparing Stings as they are all placed in the String Constants pool. And for performance it is often usful. That is dangerous. But you can’t really make the call your making without at least letting us see the so called offending code

Sponsors

Hosted excellently by RailsMachine