Community
Participate
Working Groups
build I20030611 See bug 36908. It describes a case where code expected isEnabled to be a simple getter for the enabled state, as modified by setEnabled. But this is not the case. This led to a subtle problem that was hard to debug. It is a common Java pattern to have is<Property>() methods be simple accessors for boolean properties. It would be better to use a different name for methods that go up the parent chain.
I agree but we can't change this now without breaking people.
You could @deprecate isVisible, and add a new method called isShowing() I'm not sure what the equivalent is for isEnabled, maybe Jeem would know.
Why would we do that? We're never getting rid of isVisible(), we've already made the mistake and we can never correct it. How does adding an alias help?
Because if you had done that, then the UI team would have had compile warning generated, and they would have realized they were calling a wrong method. I suppose subclasses that override that method wouldn't enjoy the confusion.
@deprecated?