diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index 9287751bdee0..f45a7631448e 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -237,6 +237,7 @@ jobs: $ENGINE_DIST_DIR/bin/enso --run test/Database_Tests $ENGINE_DIST_DIR/bin/enso --run test/Geo_Tests $ENGINE_DIST_DIR/bin/enso --run test/Visualization_Tests + $ENGINE_DIST_DIR/bin/enso --run test/Image_Tests - name: Test Engine Distribution (Windows) shell: bash @@ -247,6 +248,7 @@ jobs: $ENGINE_DIST_DIR/bin/enso.bat --run test/Database_Tests $ENGINE_DIST_DIR/bin/enso.bat --run test/Geo_Tests $ENGINE_DIST_DIR/bin/enso.bat --run test/Visualization_Tests + $ENGINE_DIST_DIR/bin/enso.bat --run test/Image_Tests # Publish - name: Publish the Engine Distribution Artifact diff --git a/RELEASES.md b/RELEASES.md index d2d812f783cc..407fa8102c44 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -16,6 +16,9 @@ conform to a standard format and have been tested to work. - Made some miscellaneous fixes to the `HTTP` portion of the `Base` library that fix a few bugs ([#1722](https://github.com/enso-org/enso/pull/1722)). +- Removed reflective access when loading the OpenCV library + ([#1727](https://github.com/enso-org/enso/pull/1727)). Illegal reflective + access operations were deprecated and will be denied in future JVM releases. ## Miscellaneous diff --git a/std-bits/src/main/java/org/enso/image/Codecs.java b/std-bits/src/main/java/org/enso/image/Codecs.java index 4164b78a890f..0a2d7df31a0e 100644 --- a/std-bits/src/main/java/org/enso/image/Codecs.java +++ b/std-bits/src/main/java/org/enso/image/Codecs.java @@ -1,7 +1,6 @@ package org.enso.image; import org.enso.image.opencv.OpenCV; -import org.opencv.core.Core; import org.opencv.core.Mat; import org.opencv.core.MatOfInt; import org.opencv.imgcodecs.Imgcodecs; @@ -12,8 +11,7 @@ public class Codecs { public static final int READ_FLAG_EMPTY = -127; static { - OpenCV.loadShared(); - System.loadLibrary(Core.NATIVE_LIBRARY_NAME); + OpenCV.loadLocally(); } /** An error occurred when reading a file. */ diff --git a/std-bits/src/main/java/org/enso/image/data/Image.java b/std-bits/src/main/java/org/enso/image/data/Image.java index b05b1f3d914d..738f56286c36 100644 --- a/std-bits/src/main/java/org/enso/image/data/Image.java +++ b/std-bits/src/main/java/org/enso/image/data/Image.java @@ -11,8 +11,7 @@ public class Image { static { - OpenCV.loadShared(); - System.loadLibrary(Core.NATIVE_LIBRARY_NAME); + OpenCV.loadLocally(); } private static final byte MAX_SIGNED_BYTE = -1; diff --git a/std-bits/src/main/java/org/enso/image/data/Matrix.java b/std-bits/src/main/java/org/enso/image/data/Matrix.java index c294c02001e8..8da5bb6e8b7a 100644 --- a/std-bits/src/main/java/org/enso/image/data/Matrix.java +++ b/std-bits/src/main/java/org/enso/image/data/Matrix.java @@ -7,8 +7,7 @@ public class Matrix { static { - OpenCV.loadShared(); - System.loadLibrary(Core.NATIVE_LIBRARY_NAME); + OpenCV.loadLocally(); } /** diff --git a/test/Image_Tests/src/Codecs_Spec.enso b/test/Image_Tests/src/Codecs_Spec.enso index 78060fd77c8f..9af1ca9ae1a5 100644 --- a/test/Image_Tests/src/Codecs_Spec.enso +++ b/test/Image_Tests/src/Codecs_Spec.enso @@ -9,7 +9,7 @@ import Standard.Test polyglot java import java.lang.System as Java_System fetch addr file = - Process.run_command "curl" [addr, "--silent", "--output", file.path] + Process.run "curl" [addr, "--silent", "--output", file.path] spec = is_ci = Java_System.getenv "CI" == "true"