File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -763,6 +763,7 @@ $(project.GENERATED_WARNING_HEADER:)
763
763
*/
764
764
package org.zeromq.$(project.prefix:c);
765
765
766
+ import java.util.stream.Stream;
766
767
import org.scijava.nativelib.NativeLoader;
767
768
. for project.use
768
769
. if count (project->dependencies.class, class.project = use.project) > 0
@@ -779,14 +780,19 @@ implements AutoCloseable\
779
780
if (System.getProperty("java.vm.vendor").contains("Android")) {
780
781
System.loadLibrary("$(project.prefix:c)jni");
781
782
} else {
782
- try {
783
+ Stream.of(
783
784
. for project.use
784
- NativeLoader.loadLibrary( "$(use.prefix:c)");
785
+ "$(use.prefix:c)",
785
786
. endfor
786
- NativeLoader.loadLibrary("$(project.prefix:c)");
787
- } catch (Exception e) {
788
- System.err.println("[WARN] " + e.getMessage() +" from jar. Assuming it is installed on the system.");
789
- }
787
+ "$(project.prefix:c)"
788
+ )
789
+ .forEach(lib -> {
790
+ try {
791
+ NativeLoader.loadLibrary(lib);
792
+ } catch (Exception e) {
793
+ System.err.println("[WARN] " + e.getMessage() +" from jar. Assuming it is installed on the system.");
794
+ }
795
+ });
790
796
try {
791
797
NativeLoader.loadLibrary("$(project.prefix:c)jni");
792
798
} catch (Exception e) {
You can’t perform that action at this time.
0 commit comments