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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • None
    • 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.

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

              Created:
              Updated:
              Resolved: