-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify warning comment for setEnabled #10075
Conversation
@@ -74,6 +74,9 @@ default void setEnabled(boolean enabled) { | |||
* XXX WARNING Do not override this method. Propagating the enabled | |||
* state to the element in this way is critical to fulfill generic | |||
* assumptions with regards to application security. | |||
* | |||
* Override Component::onEnabledStateChanged if you need to adjust how | |||
* the disabled state is visually represented in the browser. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just commenting that it is slightly weird that the warnings are here instead of in the method level javadocs 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These JavaDocs are directly inherited into each component that uses this interface. The added comments do not make any sense at all for e.g. Button
or ComboBo
. It's not optimal to have them only in the code either, but it's the best place I could think of that wouldn't pollute everything.
No description provided.