Skip to content

Commit 89e91f1

Browse files
committed
* Fix issue with Loader.getCallerClass() when a SecurityManager cannot be created (issue #176)
1 parent 217bcc2 commit 89e91f1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11

2+
* Fix issue with `Loader.getCallerClass()` when a `SecurityManager` cannot be created ([issue #176](https://github.com/bytedeco/javacpp/issues/176))
23
* Make it possible to rename enumerators of C++ `enum class` ([issue #180](https://github.com/bytedeco/javacpp/issues/180))
34
* Make the arbitrary resources available to process executed with `Builder.buildCommand` via the `BUILD_PATH` environment variable
45
* Prevent `Parser` from outputting setters for `const` member pointers
56
* Add support for arrays of function pointers
67
* Let users bundle arbitrary resources, have them extracted in cache, and used as `include` or `link` paths ([pull #43](https://github.com/bytedeco/javacpp/pull/43))
78
* Fix potential formatting issues with `OutOfMemoryError` thrown from `Pointer`
8-
* Fix `Loader.getCallerClass()` ([pull #175](https://github.com/bytedeco/javacpp/pull/175))
9+
* Fix `Loader.getCallerClass()` not using the output from the `SecurityManager` ([pull #175](https://github.com/bytedeco/javacpp/pull/175))
910
* Fix `Parser` not considering empty `class`, `struct`, or `union` declarations as opaque forward declarations
1011
* Provide `ByteIndexer` and `BytePointer` with value getters and setters for primitive types other than `byte` to facilitate unaligned memory accesses
1112
* Add a `BuildMojo.buildCommand` parameter that lets users execute arbitrary system commands easily with `ProcessBuilder`

src/main/java/org/bytedeco/javacpp/Loader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ public static Class getCallerClass(int i) {
266266
return super.getClassContext();
267267
}
268268
}.getClassContext();
269-
} catch (NoSuchMethodError e) {
270-
logger.error("No definition of this method : " + e.getMessage());
269+
} catch (NoSuchMethodError | SecurityException e) {
270+
logger.warn("Could not create an instance of SecurityManager: " + e.getMessage());
271271
}
272272
if (classContext != null) {
273273
for (int j = 0; j < classContext.length; j++) {

0 commit comments

Comments
 (0)