Sunday, January 03, 2010

Message to Microsoft

As reported by several people, the TypeConverter base class is broken. The IsValid function ALWAYS returns true, unless overridden by a derived class.

I understand that changing the behavior of the IsValid function would be a breaking change, but as the TypeConverter base class DOES NOT KNOW IF A VALUE IS VALID OR NOT, it should always return FALSE!!

That's the most logical approach.

I believe that when the TypeConverter class was being written back in the day, the programmer simply put a "return true;" to make it easy for him to do the tests that he was performing, and forgot to change it back before the shipping date.

I also firmly believe that the automated tests at that time didn't have any negative tests, i.e., tests that are OK if the method FAILS, and therefore that little bug escaped by the cracks of the dam.

So, once more, I think that the bug should be fixed and I strongly believe that no real life application will be broken in any way because any application that performed a negative test on the IsValid function on any custom TypeConverter derived class would have found that bug and fixed before shipping.

Finally, making another heartfelt appeal FIX THE DAMN BUG!!!


Post a Comment