Skip to content

Consider exposing Path getter in ApplicationTemp #50192

Description

@ZIRAKrezovic

While reading the release notes for latest version, I learned about ApplicationTemp utility which seems quite useful and even solves a security issue that Sonar is warning about when using Files.createTemp* methods with default TEMP dir.

However, ApplicationTemp only exposes methods that provide java.io.File, but uses java.nio.files.Path under the hood. We could use getFile().toPath() to get the Path, but since the Path is already used under the hood, I see no problem in simply providing it directly.

It would be great if the Path getPath() method was exposed, so the ApplicationTemp could be used with Files APIs when creating temp files or directories.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions