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

Override getResources in DefaultDeprecatedClassLoader #10349

Closed
wants to merge 2 commits into from

Conversation

blindpirate
Copy link
Collaborator

This fixes #10347

In #9898 we introduced a DefaultDeprecatedClassLoader,
which overrides getResource() but not getResources(). This causes some issues.
This PR fixes the issue by correctly overriding getResources() method.

This fixes #10347

In #9898 we introduced a DefaultDeprecatedClassLoader,
which overrides getResource() but not getResources(). This causes some issues.
This PR fixes the issue by correctly overriding getResources() method.
@blindpirate blindpirate self-assigned this Aug 23, 2019
@blindpirate blindpirate added this to the 5.6.1 milestone Aug 23, 2019
@blindpirate
Copy link
Collaborator Author

Verified the fix by using a local distribution to run the sample provided in https://discuss.gradle.org/t/gradle-5-6-runtimeexception-unable-to-load-faststringservice/32865

@blindpirate blindpirate changed the base branch from master to release August 23, 2019 04:14
@blindpirate
Copy link
Collaborator Author

@big-guy @breskeby I still don't know why so many tests are failing with "cannot delete test dir" error..

@blindpirate
Copy link
Collaborator Author

I spent a lot of time investigating why buildSrc.jar is kept open in this test https://builds.gradle.org/viewLog.html?buildId=26104430& but got no clues.

@blindpirate
Copy link
Collaborator Author

I spent several hours on the leaked file handles, it turns out to be this line, where the released classloader still holds the open file handle to jar file.

I failed to find out a good way to fix it - just an ugly workaround. Please @breskeby take a look at it.

@big-guy big-guy closed this Aug 27, 2019
@blindpirate blindpirate deleted the blindpirate/fix-10347 branch October 9, 2019 03:56
@ov7a ov7a removed this from the 5.6.1 milestone Mar 28, 2024
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.

None yet

3 participants