Skip to content

Conversation

timtebeek
Copy link
Member

The java.nio.file.Paths.get method was introduced in Java SE 7. The java.nio.file.Path.of method was introduced in Java SE 11. This recipe replaces all usages of Paths.get with Path.of for consistency.

java.nio.file.Paths:

API Note:
It is recommended to obtain a Path via the Path. of methods instead of via the get methods defined in this class as this class may be deprecated in a future release.

The `java.nio.file.Paths.get` method was introduced in Java SE 7. The `java.nio.file.Path.of` method was introduced in Java SE 11. This recipe replaces all usages of `Paths.get` with `Path.of` for consistency.
@timtebeek timtebeek self-assigned this Jul 27, 2024
@timtebeek timtebeek requested a review from cjobinabo July 27, 2024 14:25
@timtebeek timtebeek added the recipe Recipe requested label Jul 27, 2024
@timtebeek timtebeek merged commit d720f80 into main Jul 29, 2024
@timtebeek timtebeek deleted the paths-get-to-path-of branch July 29, 2024 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

recipe Recipe requested

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant