Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8253430

Improve the LibraryLookup API

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • None
    • repo-panama
    • tools

      Two issues have been reported against the LibraryLookup API:

      * the LibraryLookup::ofPath factory takes a String instead of a Path; this is less user-friendly, and also inconsistent with MemorySegment::mapFromPath

      * LibraryLookup::lookup currently throws NoSuchMethodException when lookup fails; this doesn't make a lot of sense, since we're not really looking up methods. Also, the fact that we use an exception is inconvenient and make the lookup less composable (e.g. when users want to chain together results from multiple lookups) - returning an Optional could be a better option

            mcimadamore Maurizio Cimadamore
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: