diff --git a/spring-core/src/main/java/org/springframework/core/io/PathResource.java b/spring-core/src/main/java/org/springframework/core/io/PathResource.java index fb6ba958a14..e5f39a7f866 100644 --- a/spring-core/src/main/java/org/springframework/core/io/PathResource.java +++ b/spring-core/src/main/java/org/springframework/core/io/PathResource.java @@ -56,7 +56,9 @@ import org.springframework.util.Assert; * @see java.nio.file.Path * @see java.nio.file.Files * @see FileSystemResource + * @deprecated since 7.0 in favor of {@link FileSystemResource} */ +@Deprecated(since = "7.0", forRemoval = true) public class PathResource extends AbstractResource implements WritableResource { private final Path path; diff --git a/spring-core/src/test/java/org/springframework/core/io/PathResourceTests.java b/spring-core/src/test/java/org/springframework/core/io/PathResourceTests.java index c096c9c8876..909e8a7f1e4 100644 --- a/spring-core/src/test/java/org/springframework/core/io/PathResourceTests.java +++ b/spring-core/src/test/java/org/springframework/core/io/PathResourceTests.java @@ -50,6 +50,7 @@ import static org.mockito.Mockito.mock; * @author Juergen Hoeller * @author Arjen Poutsma */ +@SuppressWarnings("removal") class PathResourceTests { private static final String TEST_DIR =