Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Update Grid to work with the new abstraction of HierarchicalArrayUpdater #275

Merged
merged 2 commits into from
Jul 24, 2018

Conversation

gilberto-torrezan
Copy link
Contributor

@gilberto-torrezan gilberto-torrezan commented Jul 23, 2018

Depends on vaadin/flow#4427


This change is Reviewable

@gilberto-torrezan gilberto-torrezan added this to the 2.0.0.alpha1 milestone Jul 23, 2018
@gilberto-torrezan gilberto-torrezan self-assigned this Jul 23, 2018
Copy link

@denis-anisimov denis-anisimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 4 of 4 files at r1.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @denis-anisimov and @gilberto-torrezan)


src/main/java/com/vaadin/flow/component/treegrid/TreeGrid.java, line 143 at r1 (raw file):

return new TreeGridArrayUpdater()

Wouldn't it be better to extract this as a nested class ?


src/main/java/com/vaadin/flow/component/treegrid/TreeGrid.java, line 191 at r1 (raw file):

GridArrayUpdater arrayUpdater,

Doesn't it make sense to introduce ArrayUpdater class as a parameter type to DataCommunicatorBuilder so that this method accepts arrayUpdater with a parameter type so that there is no need to check its type and throw an ISE exception below ?

Copy link
Contributor Author

@gilberto-torrezan gilberto-torrezan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 2 of 4 files reviewed, 4 unresolved discussions (waiting on @denis-anisimov and @vaadin-bot)


src/main/java/com/vaadin/flow/component/treegrid/TreeGrid.java, line 143 at r1 (raw file):

Previously, denis-anisimov (Denis) wrote…
return new TreeGridArrayUpdater()

Wouldn't it be better to extract this as a nested class ?

Done.


src/main/java/com/vaadin/flow/component/treegrid/TreeGrid.java, line 191 at r1 (raw file):

Previously, denis-anisimov (Denis) wrote…
GridArrayUpdater arrayUpdater,

Doesn't it make sense to introduce ArrayUpdater class as a parameter type to DataCommunicatorBuilder so that this method accepts arrayUpdater with a parameter type so that there is no need to check its type and throw an ISE exception below ?

Done.

@gilberto-torrezan gilberto-torrezan force-pushed the gilberto/non_breaking_array_updater branch from d6da197 to af63e18 Compare July 24, 2018 05:40
@vaadin-bot
Copy link

SonarQube analysis reported 24 issues

  • CRITICAL 1 critical
  • MAJOR 9 major
  • MINOR 13 minor
  • INFO 1 info

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 Grid.java#L1650: Remove usage of generic wildcard type. rule
  2. MAJOR Grid.java#: This file has 1,201 lines, which is greater than 750 authorized. Split it into smaller files. rule
  3. MAJOR Grid.java#L1294: Call "Optional#isPresent()" before accessing the value. rule
  4. MAJOR Grid.java#L1295: Either log or rethrow this exception. rule
  5. MAJOR Grid.java#L1308: Either log or rethrow this exception. rule
  6. MAJOR Grid.java#L2065: Call "Optional#isPresent()" before accessing the value. rule
  7. MAJOR Grid.java#L2075: Call "Optional#isPresent()" before accessing the value. rule
  8. MAJOR TreeGrid.java#L438: Call "Optional#isPresent()" before accessing the value. rule
  9. MAJOR TreeGrid.java#L439: Either log or rethrow this exception. rule
  10. MAJOR TreeGrid.java#L453: Either log or rethrow this exception. rule

Copy link

@denis-anisimov denis-anisimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 2 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@gilberto-torrezan gilberto-torrezan merged commit 452d662 into master Jul 24, 2018
@gilberto-torrezan gilberto-torrezan deleted the gilberto/non_breaking_array_updater branch July 24, 2018 06:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants