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

Fixed potential NPE in MountableFile #4193

Merged
merged 1 commit into from
Jun 14, 2021

Conversation

fkorotkov
Copy link
Contributor

@fkorotkov fkorotkov commented Jun 9, 2021

Class loaders can be null.

In my case context class loader was null.

Class loaders can be null
@fkorotkov
Copy link
Contributor Author

fkorotkov commented Jun 9, 2021

I did a little more debugging and in my case this container was lazily initialized in a gRPC call to an Armeria server.

Here is the related issue line/armeria#3306

@bsideup
Copy link
Member

bsideup commented Jun 9, 2021

@fkorotkov wow, that is crazy! Now I need to check a bunch of other places where I relied on the presence of Thread.currentThread().getContextClassLoader() :D

Thanks for pinpointing the issue and contributing a fix! 💯

@bsideup bsideup added this to the next milestone Jun 14, 2021
@bsideup bsideup merged commit 618dd80 into testcontainers:master Jun 14, 2021
@bsideup bsideup changed the title Fixed NPE Fixed potential NPE in MountableFile Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants