ModulePath.readModule(...) could leave files in the temp directory

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Duplicate
    • Priority: P5
    • None
    • Affects Version/s: None
    • Component/s: core-libs
    • None

      When calling jdk.internal.module.ModulePath.readModule(...) with a jar on a custom file system it creates a temp directory to copy the jar to the local filesystem. These jar and directory are left behind when the VM terminates.

      You can see this when executing the jdk jtreg test java/lang/module/customfs/ModulesInCustomFileSystem.java. It will leave two directories starting with mlib in the temp directory.

      I would suggest to use deleteOnExit() on the created directory and the copied jar file to avoid this.

            Assignee:
            Arno Zeller
            Reporter:
            Arno Zeller
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: