-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 File resolver when classloader provides URLs for directories #5092
Fix File resolver when classloader provides URLs for directories #5092
Conversation
can we test this ? what's the reproducer ? |
I have been trying to add a test but it's not that simple. Even when creating my own resolver I'm not able to reproduce. However, since the introduction of Vert.x 4.5, we got multiple reports that webjars and mvnpm jars cannot be loaded anymore. It brokes lot of existing applications. Here is one of the exception we have seen:
Something that puzzled me is that these "jars" do not have a MANIFEST, they are just zips. |
…at return a URL for directories. When unpackFromJarURL is called with a directory, the method throws an exception as the entry does not really exist. By checking the length we can detect the case and not try to retrieve the JarFile from the connection.
088d631
to
c93703e
Compare
@vietj with a test case :-D |
thanks @cescoffier can you port to master branch as well ? |
Sure! Let me do that right away! |
Port to master: #5093 |
Handle the case where the file resolver is used with a classloader that returns a URL for directories.
When unpackFromJarURL is called with a directory, the method throws an exception as the entry does not exist. We can detect the case by checking the length and not trying to retrieve the JarFile from the connection.