[foreign-preview] RFR: 8282215: Handle failures when initializing SystemLookup

Maurizio Cimadamore mcimadamore at openjdk.java.net
Tue Feb 22 10:46:28 UTC 2022


This patch handles failures originating from initialization of the SystemLookup class; instead of propagating these failures, we now swallow them, so that initialization of a `CLinker` can proceed. This adds some robustness to client code, and doubles down on the optional return type of the CLinker's lookup method.

The test checks that, when running with `os.name` set to Windows, we always manage to perform a lookup (even if we are executing the test on Linux/MacOS). The test trivially passes on Windows.

-------------

Commit messages:
 - Fix jtreg test header
 - Tweak lookup name
 - Initial push

Changes: https://git.openjdk.java.net/panama-foreign/pull/649/files
 Webrev: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=649&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8282215
  Stats: 63 lines in 3 files changed: 58 ins; 0 del; 5 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/649.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/649/head:pull/649

PR: https://git.openjdk.java.net/panama-foreign/pull/649


More information about the panama-dev mailing list