Remove reflective access when loading OpenCV (#1727)

This commit is contained in:
Dmitry Bushev 2021-05-05 19:26:01 +03:00 committed by GitHub
parent e61ee45e30
commit 46725e07c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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. */

View File

@ -11,8 +11,7 @@ import java.util.Base64;
public class Image {
static {
OpenCV.loadShared();
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
OpenCV.loadLocally();
}
private static final byte MAX_SIGNED_BYTE = -1;

View File

@ -7,8 +7,7 @@ import org.opencv.core.*;
public class Matrix {
static {
OpenCV.loadShared();
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
OpenCV.loadLocally();
}
/**

View File

@ -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"