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: fail fast if view defines same path for route and route alias #19977

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

mcollovati
Copy link
Collaborator

Currently, if a view defines @Route and @RouteAlias with the same path, the alias is rejected at startup, but there is no evidence of the error.
However, when hot swap is enabled and the view class is reloaded, an exception is thrown.
This change adds an explicit check for duplicate paths, preventing the application from starting if the configuration is invalid.

Fixes #19972

Copy link

sonarcloud bot commented Sep 18, 2024

@caalador caalador enabled auto-merge (squash) September 18, 2024 11:38
Copy link

github-actions bot commented Sep 18, 2024

Test Results

1 135 files  ±0  1 135 suites  ±0   1h 25m 23s ⏱️ - 7m 32s
7 395 tests +2  7 345 ✅ +2  50 💤 ±0  0 ❌ ±0 
7 731 runs  +7  7 671 ✅ +7  60 💤 ±0  0 ❌ ±0 

Results for commit cebd90c. ± Comparison against base commit c615be5.

♻️ This comment has been updated with latest results.

@caalador caalador merged commit bf420c4 into main Sep 18, 2024
26 checks passed
@caalador caalador deleted the issues/19972_validate_route_alias_at_startup branch September 18, 2024 12:17
vaadin-bot added a commit that referenced this pull request Sep 18, 2024
vaadin-bot added a commit that referenced this pull request Sep 18, 2024
vaadin-bot added a commit that referenced this pull request Sep 18, 2024
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.5.0.beta2 and is also targeting the upcoming stable 24.5.0 version.

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.

Hotswap exception when updating a route class with matching Route and RouteAlias
3 participants