Skip to content

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