Skip to content
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

Merged
merged 1 commit into from
Mar 2, 2021
Merged

Conversation

Legioth
Copy link
Member

@Legioth Legioth commented Feb 18, 2021

No description provided.

@@ -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.
Copy link
Contributor

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 🤷

Copy link
Member Author

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.

@pleku pleku merged commit bd7f0ea into master Mar 2, 2021
@pleku pleku deleted the clarifySetEnabledWarning branch March 2, 2021 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants