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

Revisit name of SymbolLookup::lookup

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • None
    • repo-panama
    • core-libs

      In english, "lookup" is both a verb and a noun. The SymbolLookup API uses "lookup" in both forms: as a noun (in SymbolLookup), but also as a verb (in SymbolLookup::lookup).

      This overloading leads to some odd code - e.g.

      ```
      var lookup = SymbolLookup.loaderLookup();
      lookup.lookup("qsort");
      ```

      It would be better to rename the "lookup" method to something more neutral such as "find" (the javadoc for SymbolLookup uses that term several times, to avoid confusion).

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

              Created:
              Updated:
              Resolved: