Skip to content

Commit

Permalink
merge master -Dorg -Ssuccess-only: PR 4090 (Throw error when cannot l…
Browse files Browse the repository at this point in the history
…oad library)
  • Loading branch information
snoopycrimecop committed Oct 5, 2023
2 parents 4f4c3fe + 39f944f commit 208765d
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ public JPEGTurboServiceImpl() {
logger = Logger.getLogger(NATIVE_LIB_CLASS);
logger.setLevel(Level.SEVERE);
if (!libraryLoaded) {
NativeLibraryUtil.loadNativeLibrary(TJ.class, "turbojpeg");
libraryLoaded = true;
libraryLoaded = NativeLibraryUtil.loadNativeLibrary(TJ.class, "turbojpeg");
if (!libraryLoaded) {
throw new RuntimeException("TurboJPEG could not be loaded");
}
}
}

Expand Down

0 comments on commit 208765d

Please sign in to comment.