Skip to content

Commit cc7c8d9

Browse files
committedDec 3, 2020
Change test into an assertion as mapLibraryName should never return null
1 parent 63bd892 commit cc7c8d9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/main/java/org/fusesource/jansi/internal/JansiLoader.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@ private static void loadJansiNativeLibrary() throws Exception {
274274
String jansiNativeLibraryName = System.getProperty("library.jansi.name");
275275
if (jansiNativeLibraryName == null) {
276276
jansiNativeLibraryName = System.mapLibraryName("jansi");
277-
if (jansiNativeLibraryName != null && jansiNativeLibraryName.endsWith(".dylib")) {
277+
assert jansiNativeLibraryName != null;
278+
if (jansiNativeLibraryName.endsWith(".dylib")) {
278279
jansiNativeLibraryName = jansiNativeLibraryName.replace(".dylib", ".jnilib");
279280
}
280281
}

0 commit comments

Comments
 (0)
Please sign in to comment.