Skip to content

Commit 1b7ccbc

Browse files
committed
Deprecate PathResource variant
This commit deprecates the `PathResource` implementation variant in favor of `FileSystemResource`. This was already pointing to `FileSystemResource` as of Spring Framework 5.1 and we now consider this variant as deprecated. Closes gh-34206
1 parent e184860 commit 1b7ccbc

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

spring-core/src/main/java/org/springframework/core/io/PathResource.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@
5656
* @see java.nio.file.Path
5757
* @see java.nio.file.Files
5858
* @see FileSystemResource
59+
* @deprecated since 7.0 in favor of {@link FileSystemResource}
5960
*/
61+
@Deprecated(since = "7.0", forRemoval = true)
6062
public class PathResource extends AbstractResource implements WritableResource {
6163

6264
private final Path path;

spring-core/src/test/java/org/springframework/core/io/PathResourceTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
* @author Juergen Hoeller
5151
* @author Arjen Poutsma
5252
*/
53+
@SuppressWarnings("removal")
5354
class PathResourceTests {
5455

5556
private static final String TEST_DIR =

0 commit comments

Comments
 (0)