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: Make Flow Grid compatible with ASM versions older than 9 #4615

Merged
merged 8 commits into from
Feb 3, 2023

Conversation

mshabarov
Copy link
Contributor

Solution for vaadin/flow#15625, until payara/Payara#6127 is fixed.

@sonatype-lift
Copy link
Contributor

sonatype-lift bot commented Jan 30, 2023

🛠 Lift Auto-fix

Some of the Lift findings in this PR can be automatically fixed. You can download and apply these changes in your local project directory of your branch to review the suggestions before committing.1

# Download the patch
curl https://lift.sonatype.com/api/patch/github.com/vaadin/flow-components/4615.diff -o lift-autofixes.diff

# Apply the patch with git
git apply lift-autofixes.diff

# Review the changes
git diff

Want it all in a single command? Open a terminal in your project's directory and copy and paste the following command:

curl https://lift.sonatype.com/api/patch/github.com/vaadin/flow-components/4615.diff | git apply

Once you're satisfied commit and push your changes in your project.

Footnotes

  1. You can preview the patch by opening the patch URL in the browser.

@mshabarov mshabarov requested a review from yuriy-fix January 31, 2023 06:32
@mshabarov mshabarov changed the title fix: Make Flow Grid compatible with ASM framework fix: Make Flow Grid compatible with ASM versions older than 9 Jan 31, 2023
protected abstract <T> GridSelectionModel<T> createModel(Grid<T> grid);
protected <T> GridSelectionModel<T> createModel(Grid<T> grid) {
return switch (this) {
case SINGLE -> new AbstractGridSingleSelectionModel<T>(grid) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just thinking out load: are you sure the oldish ASM can work with this newish switch? 😬

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! But believe or not, this new switch doesn't trigger any errors in Payara, application starts fine 😅 don't ask me why :)

@mshabarov
Copy link
Contributor Author

We need this before releasing 24.0 beta.

@sissbruecker sissbruecker enabled auto-merge (squash) February 3, 2023 09:39
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 3, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell E 44 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sissbruecker sissbruecker merged commit 57cb2a4 into master Feb 3, 2023
@sissbruecker sissbruecker deleted the grid-payara branch February 3, 2023 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants