Skip to content

Commit

Permalink
Change test into an assertion as mapLibraryName should never return null
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Dec 3, 2020
1 parent 63bd892 commit cc7c8d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/fusesource/jansi/internal/JansiLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,8 @@ private static void loadJansiNativeLibrary() throws Exception {
String jansiNativeLibraryName = System.getProperty("library.jansi.name");
if (jansiNativeLibraryName == null) {
jansiNativeLibraryName = System.mapLibraryName("jansi");
if (jansiNativeLibraryName != null && jansiNativeLibraryName.endsWith(".dylib")) {
assert jansiNativeLibraryName != null;
if (jansiNativeLibraryName.endsWith(".dylib")) {
jansiNativeLibraryName = jansiNativeLibraryName.replace(".dylib", ".jnilib");
}
}
Expand Down

0 comments on commit cc7c8d9

Please sign in to comment.