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

fix: replace select(null) with deselectAll() (#189) #567

Conversation

tulioag
Copy link
Contributor

@tulioag tulioag commented Jan 15, 2021

No description provided.

Related-to: vaadin/vaadin-grid-flow#1014 which corrects Grid JavaDoc
Details: See SelectionModel JavaDoc (Grid#select uses SelectionModel#select):
It is SelectionModel.java and inherited select() there. Grid's select is direct call to that. Grid's JavaDoc has dropped the notion of null not ok.
/**
 * Selects the given item. Depending on the implementation, may cause other
 * items to be deselected. If the item is already selected, does nothing.
 *
 * @param item
 *            the item to select, not null
 */
void select(T item);

Co-authored-by: Manuel Carrasco Moñino <manolo@vaadin.com>
Co-authored-by: Tulio Garcia <tulio@vaadin.com>
@vaadin-bot
Copy link
Collaborator

SonarQube analysis reported 17 issues

  • CRITICAL 5 critical
  • MAJOR 3 major
  • MINOR 9 minor

Top 10 extra issues

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. CRITICAL Crud.java#L92: Make "gridActiveItem" transient or serializable. rule
  2. CRITICAL Crud.java#L170: Refactor this method to reduce its Cognitive Complexity from 18 to the 15 allowed. rule
  3. CRITICAL Crud.java#L602: Remove usage of generic wildcard type. rule
  4. CRITICAL Crud.java#L751: Make "item" transient or serializable. rule
  5. CRITICAL Crud.java#L789: Make "item" transient or serializable. rule
  6. MAJOR Crud.java#L178: Define and throw a dedicated exception instead of using a generic one. rule
  7. MAJOR Crud.java#L433: Rename "grid" which hides the field declared at line 90. rule
  8. MAJOR Crud.java#L813: Remove this unused method parameter "ignored". rule
  9. MINOR Crud.java#L172: Remove this unnecessary cast to "ComponentEventListener". rule
  10. MINOR Crud.java#L185: Remove this unnecessary cast to "ComponentEventListener". rule

@DiegoCardoso DiegoCardoso changed the title Cherry-pick fix: replace select(null) with deselectAll() (#189) into 14.4 fix: replace select(null) with deselectAll() (#189) Jan 20, 2021
@DiegoCardoso DiegoCardoso merged commit ba9d558 into 14.4 Jan 20, 2021
@DiegoCardoso DiegoCardoso deleted the cherry-pick/14.4/189_fix_replace_select_null_with_deselectAll_ branch January 20, 2021 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants