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

Clarify JavaFileManager use of "module location"

    XMLWordPrintable

Details

    • b147
    • Verified

    Description


      JavaFileManager is inconsistent in its use of the phrase "module location".

      JavaFileManager.Location.isModuleLocation
          returns true for a module-oriented location, such as MODULE_PATH, UPGRADE_MODULE_PATH, etc.
          The description is accurate, even if the name is confusing.

      JavaFileManager.getModuleLocation(<overloaded>)
          returns a package-oriented location for a specific module.
          The method should be called on a location for which Location.isModuleLocation is true;the result is one for which isModuleLocation should be false! Ouch.

      JavaFileManager.listModuleLocations
          returns a series of package-oriented locations for individuial modules on a module path.
          The method should be called on a location for which Location.isModuleLocation is true; the result is a series of locations for which isModuleLocation should be false! Ouch.

      isModuleLocation is about "module-oriented locations", such as module paths, containing possibly many modules; the other two methods are about "locations for modules", meaning a package-oriented location for the contents of a specific module.

      This causes significant confusion for users.

      Attachments

        Activity

          People

            jjg Jonathan Gibbons
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: