RFR: 8321159: SymbolLookup.libraryLookup(Path, Arena) Assumes default Filesystem [v4]
Maurizio Cimadamore
mcimadamore at openjdk.org
Tue Dec 5 10:13:42 UTC 2023
On Tue, 5 Dec 2023 07:16:49 GMT, Per Minborg <pminborg at openjdk.org> wrote:
>> This PR proposes to reject paths provided to the `SymbolLookup.libraryLookup(Path path, Arena arena)` method if a path is not in the default file system.
>
> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>
> Change @throws description
src/java.base/share/classes/java/lang/foreign/SymbolLookup.java line 297:
> 295: Reflection.ensureNativeAccess(Reflection.getCallerClass(),
> 296: SymbolLookup.class, "libraryLookup");
> 297: if (!(path.getFileSystem() == FileSystems.getDefault())) {
Shouldn't this be written as `path.getFileSystem() != FileSystems.getDefault()` ?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16944#discussion_r1415288970
More information about the core-libs-dev
mailing list