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
refactor!: Remove StaticFileHandler.isStaticResourceRequest #12263
Conversation
Even if it is unlikely that anyone is using this API, should it be marked as |
da693a9
to
50a99da
Compare
Isn't the vaadin website using this API? Looking at the PR / feature request that introduced this feature? #4914 It's possible that some users have used this API for the exact same thing. |
50a99da
to
9a18dc8
Compare
It is still possible to override it in the same way. Only it should be simpler because there is one method and not two |
ec830aa
to
2c853b6
Compare
This simplifies static file handling so the same logic is not duplicate in two places. It also makes it possible to always query the dev server for files instead of knowing upfront what the dev server can serve. The method is removed instead of retained as there are two ways it could have been used: 1. Called to check if a given request is a static resource request 2. Overridden in a custom StaticFileHandler To keep the method we would need to do the following for the cases: 1. Make isStaticResourceRequest return serveStaticResource() != null 2. Make serveStaticResource() call isStaticResourceRequest() as the first thing We cannot do both so it is safer to remove the method to force code to be updated
e83322b
to
2d0aa18
Compare
SonarQube analysis reported 14 issues Top 10 issues
|
This ticket/PR has been released with platform 22.0.0.beta1 and is also targeting the upcoming stable 22.0.0 version. |
This simplifies static file handling so the same logic is not duplicate in two places. It also makes it possible to always query the dev server for files instead of knowing upfront what the dev server can serve.
The method is removed instead of retained as there are two ways it could have been used:
To keep the method we would need to do the following for the cases:
We cannot do both so it is safer to remove the method to force code to be updated