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

Removed usage of System class Loader #478

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Julius-Babies
Copy link

@Julius-Babies Julius-Babies commented Feb 26, 2025

Prologue

I was tasked with creating an endpoint in a Java backend project that concatenates multiple video files and returns the output. However, I encountered a NullPointerException at runtime when using the MovieBuilder class. This issue stemmed from the input stream being null, which was caused by calling the system class loader in a web container (as discussed in this Stack Overflow thread).

About this Pull Request

This pull request addresses the issue by replacing the usage of the system class loader with the regular class loader, similar to the approach taken a few lines further down in the code. This change has been tested and works as expected both in our web container and in a local Java project environment.

Changes Made

  • Replaced instances of the system class loader with the regular class loader in the PropertyBoxParserImpl class.
  • Verified functionality in both the web container and local environments to ensure compatibility.

Testing

  • Conducted unit tests to confirm that the video concatenation functionality works without throwing a NullPointerException.
  • Tested in both local and web container environments to ensure consistent behavior.

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.

2 participants